aboutsummaryrefslogtreecommitdiff
path: root/plugins-root
diff options
context:
space:
mode:
authorGravatar Aksel Sjögren <asjogren@itrsgroup.com> 2021-11-15 14:29:51 +0100
committerGravatar Sven Nierlein <sven@nierlein.org> 2021-11-15 17:55:49 +0100
commit3f9b22ab16b5a9b74d62d7fff9b6bf3a51ed93f7 (patch)
treeb6cdc78a7c2197b5b1fb01a0910d5110dbbbcda3 /plugins-root
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>
Diffstat (limited to 'plugins-root')
-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 31eb4c65..519b93c6 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)
/* if we're in hostcheck mode, exit with limited printouts */
if(mode == MODE_HOSTCHECK) {
printf("OK - %s responds to ICMP. Packet %u, rta %0.3fms|"
- "pkt=%u;;0;%u rta=%0.3f;%0.3f;%0.3f;;\n",
+ "pkt=%u;;;0;%u rta=%0.3f;%0.3f;%0.3f;;\n",
host->name, icmp_recv, (float)tdiff / 1000,
icmp_recv, packets, (float)tdiff / 1000,
(float)warn.rta / 1000, (float)crit.rta / 1000);