Hi,

Thank you Richard. I get it.

I write this mail to show everybody how I get to use the negative binary
file (if someone don't know how to do it, here you have)

As Richard tell us, you only get the negative result on the Nagios console.
If you launch the ./negate check_xx, you always get the check_xxx result,
not the negative.

So, you have to put the command 'wrapped' in the negate command in the
nagios
configuration like that, in the checkcommands.cfg, for example:
In this example, I use the check_http command.

define command{
       command_name    check_http_negate
       command_line    $USER1$/negate "/opt/nagios/libexec/check_http -H
10.190.8.xxx -p 80 -u "url" -s "string""
       }

Remember that you have to indicate the complete path of the command (in this
case, check_http), and put everything between " "

Good Luck!!

And thank you very much, Richard

Yolanda

2007/1/30, Richard Luys-Nagios User <[EMAIL PROTECTED]>:

On Tue, 30 Jan 2007 10:48:00 +0100, Yolanda Santos <[EMAIL PROTECTED]>
wrote:

>  <nagios-users@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/

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users@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

Reply via email to