[Nagiosplug-help] Questions using negate?
Rose David
DRose at snyderdrug.com
Wed Mar 5 09:41:19 CET 2003
Thank you for your response and input. I have now used your script and it
has gotten me farther along than I have been able to this point. Here is
the catch. When I run this on the command line, it works just as
advertised, switching the return codes from 2 to 0 or from 0 to 2. However,
when I run it in nagios as a command, either a Critical or an OK state on
the check_ping shows up as OK. Using the same command, I get the following
two results:
Status Status Information
OK CRITICAL - Plugin timed out after 10 seconds
OK PING OK - Packet loss = 20%, RTA = 245.95 ms
Any further input as to what I might do to get this to work?
> We re-wrote negate as a simple perl script. I have tried your
> check_ping input with my version of negate and here is what I get:
>
>
> root at lxxxx:[/home/nagios/etc]: /home/nagios/libexec/new-negate
> /home/nagios/libexec/check_ping -H auspap01 -w 1000.0,100% -c
> 1000.0,100% -p 5
> Command is: /home/nagios/libexec/check_ping -H host01 -w
> 1000.0,100% -c
> 1000.0,100% -p 5PING OK - Packet loss = 0%, RTA = 4.62 ms
> Return code is 0
> root at lapin:[/home/nagios/etc]: echo $?
> 2
>
> The first return code is the actual return from the check_ping plugin,
> the second $? output is the negated output. Since check_ping produces
> multiple return codes depending on the result, it is
> difficult to use a
> generic negate plugin. I have included our version of the plugin
> "new-negate. Hope this helps..
>
> Good luck
>
>
> John Cockerham
> Sr. Network Administrator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20030305/2aa368ea/attachment.html>
More information about the Help
mailing list