negate plugin problems

jeff vier jeff.vier at tradingtechnologies.com
Wed Aug 25 22:17:07 CEST 2004


On Wed, 2004-08-25 at 19:09 +0200, Luca Corti wrote:
> define command {
>     command_name    check-host-alive
>     command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c
> 5000.0,100% -p 1"
> }

That won't work - one double-quote at the end of a line will cause the
command to hang.

> define command {
>     command_name    check-host-not-alive
>     command_line    $USER1$/negate "$USER1$/check_ping -H $HOSTADDRESS$
> -w 3000.0,80% -c 5000.0,100% -p 1"
> }
> 
> I then set up templates for the hosts and the ping service to use check-
> host-not-alive as their check_command.
> 
> The problem is Nagios still reports the hosts as down. But I tried the
> check command from the commandline and it seems to return different
> values.

What is the output via Nagios? (what's in the far right table column in
the cgi display?)

> # check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1
> PING OK - Packet loss = 0%, RTA = 0.10 ms
> # echo $?
> 0
> # negate "check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 1"
> PING OK - Packet loss = 0%, RTA = 0.20 ms
> # echo $?
> 2

Those both look like you'd expect, right?



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list