aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_ping.c
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2012-06-24 15:51:56 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2012-06-24 15:51:56 +0200
commit991054fa6e3d8b3288679ebfe6d84bcfe3ca5d20 (patch)
tree3747a14f1f4af6f21afaa4a15dde02d676d7b3b3 /plugins/check_ping.c
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)
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r--plugins/check_ping.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 1367e903..bfdee492 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -500,9 +500,7 @@ run_ping (const char *cmd, const char *addr)
(void) fclose (child_stderr);
- /* close the pipe - WARNING if status is set */
- if (spclose (child_process))
- result = max_state (result, STATE_WARNING);
+ spclose (child_process);
if (warn_text == NULL)
warn_text = strdup("");