summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerhard Lausser <gerhard.lausser@consol.de>2017-02-07 14:15:47 +0100
committerJan Wagner <waja@cyconet.org>2021-04-10 13:43:12 +0200
commit001f684d210d0ca2d81b14ff3fcee02542d36a98 (patch)
tree2190c66cd4a3afa130a929da87d9c196035d564a
parent0d504aea51f4835f038ce1943175c943a4b6b1eb (diff)
downloadmonitoring-plugins-001f684d210d0ca2d81b14ff3fcee02542d36a98.tar.gz
check_snmp: put the "c" (to mark a counter) after the perfdata value
-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 e8a21a40..afc568b2 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -576,6 +576,9 @@ main (int argc, char **argv)
576 len = sizeof(perfstr)-strlen(perfstr)-1; 576 len = sizeof(perfstr)-strlen(perfstr)-1;
577 strncat(perfstr, show, len>ptr-show ? ptr-show : len); 577 strncat(perfstr, show, len>ptr-show ? ptr-show : len);
578 578
579 if (type)
580 strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1);
581
579 if (warning_thresholds) { 582 if (warning_thresholds) {
580 strncat(perfstr, ";", sizeof(perfstr)-strlen(perfstr)-1); 583 strncat(perfstr, ";", sizeof(perfstr)-strlen(perfstr)-1);
581 strncat(perfstr, warning_thresholds, sizeof(perfstr)-strlen(perfstr)-1); 584 strncat(perfstr, warning_thresholds, sizeof(perfstr)-strlen(perfstr)-1);
@@ -588,8 +591,6 @@ main (int argc, char **argv)
588 strncat(perfstr, critical_thresholds, sizeof(perfstr)-strlen(perfstr)-1); 591 strncat(perfstr, critical_thresholds, sizeof(perfstr)-strlen(perfstr)-1);
589 } 592 }
590 593
591 if (type)
592 strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1);
593 strncat(perfstr, " ", sizeof(perfstr)-strlen(perfstr)-1); 594 strncat(perfstr, " ", sizeof(perfstr)-strlen(perfstr)-1);
594 } 595 }
595 } 596 }