summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <ton.voon@opsera.com>2010-06-22 13:49:09 (GMT)
committerTon Voon <ton.voon@opsera.com>2010-06-22 13:49:09 (GMT)
commit5551252e03ec070cdb6310631057a01ca082ec96 (patch)
tree628a7cdadd7277569a8ce3f5a3500c8df12d6161
parent0a8eb166be8bf07809cd6ecedbc649f14ea15d16 (diff)
downloadmonitoring-plugins-5551252e03ec070cdb6310631057a01ca082ec96.tar.gz
Suffix perf data with "-rate" to signify a rate calculation
-rw-r--r--plugins/check_snmp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index a775f95..4741454 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;