diff options
author | Ton Voon <ton.voon@opsera.com> | 2010-06-22 14:49:09 +0100 |
---|---|---|
committer | Ton Voon <ton.voon@opsera.com> | 2010-06-22 14:49:09 +0100 |
commit | 5551252e03ec070cdb6310631057a01ca082ec96 (patch) | |
tree | 628a7cdadd7277569a8ce3f5a3500c8df12d6161 | |
parent | 0a8eb166be8bf07809cd6ecedbc649f14ea15d16 (diff) | |
download | monitoring-plugins-5551252e03ec070cdb6310631057a01ca082ec96.tar.gz |
Suffix perf data with "-rate" to signify a rate calculation
-rw-r--r-- | plugins/check_snmp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index a775f95e..47414541 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c | |||
@@ -489,6 +489,8 @@ main (int argc, char **argv) | |||
489 | temp_string=labels[i]; | 489 | temp_string=labels[i]; |
490 | else | 490 | else |
491 | temp_string=oidname; | 491 | temp_string=oidname; |
492 | if(calculate_rate) | ||
493 | asprintf(&temp_string,"%s-rate",temp_string); | ||
492 | strncat(perfstr, temp_string, sizeof(perfstr)-strlen(perfstr)-1); | 494 | strncat(perfstr, temp_string, sizeof(perfstr)-strlen(perfstr)-1); |
493 | strncat(perfstr, "=", sizeof(perfstr)-strlen(perfstr)-1); | 495 | strncat(perfstr, "=", sizeof(perfstr)-strlen(perfstr)-1); |
494 | len = sizeof(perfstr)-strlen(perfstr)-1; | 496 | len = sizeof(perfstr)-strlen(perfstr)-1; |