diff options
author | Sven Nierlein <sven@nierlein.de> | 2021-04-07 17:12:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-07 17:12:38 +0200 |
commit | de7effdf06bc3808bbe82025bf695538b26599fa (patch) | |
tree | 5102f144154c09b283da0884b4d9a2b98afd811f /plugins | |
parent | 7ac706e894e292f6389df156f954c1eaafa6241b (diff) | |
parent | c85281d25bb4b0fc12a45b2732620f51a10344be (diff) | |
download | monitoring-plugins-de7effdf06bc3808bbe82025bf695538b26599fa.tar.gz |
Merge pull request #1465 from lausser/master
check_snmp: put the "c" (to mark a counter) after the perfdata value
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_snmp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index e8a21a40..afc568b2 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); } } |