[nagiosplug] check_ping: Ignore ping(1)'s exit status
"Nagios Plugin Development" <[email protected]> Sun, 24 Jun 2012 22:40:26 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug Branch: master Commit: 991054fa6e3d8b3288679ebfe6d84bcfe3ca5d20 Author: Holger Weiss <[email protected]> Date: Sun Jun 24 15:51:56 2012 +0200 URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=991054f 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) --- THANKS.in | 1 + plugins/check_ping.c | 4 +--- 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 Matej Vela Jason Ellison Charles-Henri Larose +Tobias 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) (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(""); ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/