Negate binary file
    Richard Luys-Nagios User 
    nagios at thebug.demon.nl
       
    Tue Jan 30 12:48:44 CET 2007
    
    
  
On Tue, 30 Jan 2007 10:48:00 +0100, Yolanda Santos <iamyolanda at gmail.com>  
wrote:
>  <nagios-users at lists.sourceforge.net>Hi,
>
> I have tried to use the negate binary file, but it doesn't work.
> Am I doing something wrong?
Hello Yolanda,
No, your not doing something wrong, your just confused ;-) let me explain:
The OK you see is the exit status of the check_http plugin, which is  
indeed: OK. If you check the status of the negate with echo $? (directly  
after you issued the command) you should see a response of '2', which is  
the exitstatus known as CRITICAL.
Nagios interprets the negate exitstatus and not the exitstatus of the  
command you 'negated'.
Just put your command 'wrapped' in the negate command in your nagios  
configuration and it will show up as a CRITICAL when the plaintext-error  
page is shown.
Good Luck!
Richard
>
> I check:
>
> ./check_http -H 10.190.8.xxx -p 80 -u "url" -s "ERROR"
>
> And I get an OK
>
> Then, now I want the opposite, so I do:
>
> ./negate "check_http -H 10.190.8.xxx -p 80 -u "url" -s "ERROR""
>
> And I get an  OK again. If I add the complete path:
>
> ./negate "/opt/nagios/libexec/check_http -H 10.190.8.xxx -p 80 -u "url"  
> -s
> "ERROR""
>
> I continuous get an OK...
>
> What is wrong?
>
> Thanks
-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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