negate plugin problems
Luca Corti
cortez at tiscalinet.it
Wed Aug 25 19:09:31 CEST 2004
Hi all,
I'm having problems with the negate plugin. I need this to check some
backup ISDN lines which I want to be reported down when they are up and
up when they are down.
I've defined a new command in checkcommands.cfg to check that an host is
NOT pingable:
define command {
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c
5000.0,100% -p 1"
}
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.
# 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
What am I missing?
thanks
Luca
CONFIDENTIALITY NOTICE
This message and its attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender immediately, delete this message and do not disclose the contents to any other person, do not use it for any purpose or store or copy the information in any medium.
-------------------------------------------------------
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