aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Gerhard Lausser <gerhard.lausser@consol.de> 2017-02-07 14:15:47 +0100
committerGravatar Gerhard Lausser <gerhard.lausser@consol.de> 2017-02-07 14:15:47 +0100
commitc85281d25bb4b0fc12a45b2732620f51a10344be (patch)
tree5d3ef3689db2c066395dc41d63a4dc7229b5cb77 /plugins
parent0d73b499dd939924d49f955ac84550fab5f3cdde (diff)
downloadmonitoring-plugins-c85281d25bb4b0fc12a45b2732620f51a10344be.tar.gz
check_snmp: put the "c" (to mark a counter) after the perfdata value
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_snmp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index da9638c4..b5abac18 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);
}
}