summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2012-06-24 13:51:56 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2012-06-24 13:51:56 (GMT)
commit991054fa6e3d8b3288679ebfe6d84bcfe3ca5d20 (patch)
tree3747a14f1f4af6f21afaa4a15dde02d676d7b3b3
parentd61a3056c598bf030e699a094671727f841eca8c (diff)
downloadmonitoring-plugins-991054fa6e3d8b3288679ebfe6d84bcfe3ca5d20.tar.gz
check_ping: Ignore ping(1)'s exit status
Don't return a WARNING state if the number of lost packets is greater than zero but below the specified warning threshold. This happened because the check_ping plugin used the exit status of the ping(1) utility. (#3535140 - Tobias Brox)
-rw-r--r--THANKS.in1
-rw-r--r--plugins/check_ping.c4
2 files changed, 2 insertions, 3 deletions
diff --git a/THANKS.in b/THANKS.in
index b9368a4..470a7ee 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -275,3 +275,4 @@ Marc Remy
275Matej Vela 275Matej Vela
276Jason Ellison 276Jason Ellison
277Charles-Henri Larose 277Charles-Henri Larose
278Tobias Brox
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 1367e90..bfdee49 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -500,9 +500,7 @@ run_ping (const char *cmd, const char *addr)
500 (void) fclose (child_stderr); 500 (void) fclose (child_stderr);
501 501
502 502
503 /* close the pipe - WARNING if status is set */ 503 spclose (child_process);
504 if (spclose (child_process))
505 result = max_state (result, STATE_WARNING);
506 504
507 if (warn_text == NULL) 505 if (warn_text == NULL)
508 warn_text = strdup(""); 506 warn_text = strdup("");