summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAksel Sjögren <asjogren@itrsgroup.com>2021-11-15 13:29:51 (GMT)
committerSven Nierlein <sven@nierlein.org>2021-11-15 16:55:49 (GMT)
commit3f9b22ab16b5a9b74d62d7fff9b6bf3a51ed93f7 (patch)
treeb6cdc78a7c2197b5b1fb01a0910d5110dbbbcda3
parentbc6effd2b53e58bb8aec6fc4b4465a3927b518d2 (diff)
downloadmonitoring-plugins-3f9b22ab16b5a9b74d62d7fff9b6bf3a51ed93f7.tar.gz
check_icmp: Fix pkt perfdata in check_host mode
Add missing "warn" threshold field in "pkt" perfdata output. Perfdata should be interpreted as; 'label'=value[UOM];[warn];[crit];[min];[max] With one field missing, the hardcoded min value '0' ended up in the "crit" field, making applications interpreting the perfdata thining that critical threshold is always exceeded. Signed-off-by: Aksel Sjögren <asjogren@itrsgroup.com>
-rw-r--r--plugins-root/check_icmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index 31eb4c6..519b93c 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -921,7 +921,7 @@ wait_for_reply(int sock, u_int t)
921 /* if we're in hostcheck mode, exit with limited printouts */ 921 /* if we're in hostcheck mode, exit with limited printouts */
922 if(mode == MODE_HOSTCHECK) { 922 if(mode == MODE_HOSTCHECK) {
923 printf("OK - %s responds to ICMP. Packet %u, rta %0.3fms|" 923 printf("OK - %s responds to ICMP. Packet %u, rta %0.3fms|"
924 "pkt=%u;;0;%u rta=%0.3f;%0.3f;%0.3f;;\n", 924 "pkt=%u;;;0;%u rta=%0.3f;%0.3f;%0.3f;;\n",
925 host->name, icmp_recv, (float)tdiff / 1000, 925 host->name, icmp_recv, (float)tdiff / 1000,
926 icmp_recv, packets, (float)tdiff / 1000, 926 icmp_recv, packets, (float)tdiff / 1000,
927 (float)warn.rta / 1000, (float)crit.rta / 1000); 927 (float)warn.rta / 1000, (float)crit.rta / 1000);