From 5551252e03ec070cdb6310631057a01ca082ec96 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Tue, 22 Jun 2010 14:49:09 +0100 Subject: Suffix perf data with "-rate" to signify a rate calculation 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) temp_string=labels[i]; else temp_string=oidname; + if(calculate_rate) + asprintf(&temp_string,"%s-rate",temp_string); strncat(perfstr, temp_string, sizeof(perfstr)-strlen(perfstr)-1); strncat(perfstr, "=", sizeof(perfstr)-strlen(perfstr)-1); len = sizeof(perfstr)-strlen(perfstr)-1; -- cgit v0.10-9-g596f