From c85281d25bb4b0fc12a45b2732620f51a10344be Mon Sep 17 00:00:00 2001 From: Gerhard Lausser Date: Tue, 7 Feb 2017 14:15:47 +0100 Subject: check_snmp: put the "c" (to mark a counter) after the perfdata value diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index da9638c..b5abac1 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -576,6 +576,9 @@ main (int argc, char **argv) len = sizeof(perfstr)-strlen(perfstr)-1; strncat(perfstr, show, len>ptr-show ? ptr-show : len); + if (type) + strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1); + if (warning_thresholds) { strncat(perfstr, ";", sizeof(perfstr)-strlen(perfstr)-1); strncat(perfstr, warning_thresholds, sizeof(perfstr)-strlen(perfstr)-1); @@ -588,8 +591,6 @@ main (int argc, char **argv) strncat(perfstr, critical_thresholds, sizeof(perfstr)-strlen(perfstr)-1); } - if (type) - strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1); strncat(perfstr, " ", sizeof(perfstr)-strlen(perfstr)-1); } } -- cgit v0.10-9-g596f