how to use negate !!

Sebastian Ries Sebastian.Ries at dtnet.de
Thu Dec 6 13:58:29 CET 2007


Am Donnerstag, den 06.12.2007, 12:42 +0100 schrieb Sjaak Nabuurs VSM
Hosting:
> Hello users
> 
> Why isn't this not working or what's wrong !!
> 
> ./negate "/usr/local/nagios/libexec/check_ping -H x.x.x.x -w1,10% 
> -c2,20% -t 1 -p 1"
> PING CRITICAL - Packet loss = 100%
> 
> where x.x.x.x is an IP who's blocked by the firewall.

Did you check the Return-code of your command?
sysmon:/usr/lib/nagios/plugins# /usr/lib/nagios/plugins/check_http -H
<host>
HTTP OK HTTP/1.1 200 OK - 831 bytes in 0.005 seconds |
time=0.005336s;;;0.000000 size=831B;;;0
sysmon:/usr/lib/nagios/plugins# echo $?
0
sysmon:/usr/lib/nagios/plugins# ./negate
"/usr/lib/nagios/plugins/check_http -H <host>"
HTTP OK HTTP/1.1 200 OK - 831 bytes in 0.006 seconds |
time=0.006457s;;;0.000000 size=831B;;;0
sysmon:/usr/lib/nagios/plugins# echo $?
2

How do you expact the negate-script to change the output of your check?

Regards
Sebastian Ries

-- 
------------------------------------------------------------
DT Netsolution GmbH -  Talaeckerstr. 30 -  D-70437 Stuttgart
Tel: +49-711-849910-36               Fax: +49-711-849910-936
WEB: http://www.dtnet.de/     email: Sebastian.Ries at dtnet.de

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
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