[Nagiosplug-help] Questions using negate?

Rick . rickm106 at hotmail.com
Thu Mar 6 13:24:14 CET 2003


I can confirm that this also happens with the check_http plugin. It works 
correctly on the command line but when invoked by netsaint both return codes 
0 and 2 both return as OK in nagios.

my check_http command line is as follows:
$USER1$/newnegate /usr/local/nagios/libexec/check_http -H $HOSTADDRESS$ \-s 
$ARG1$ -u $ARG2

Service command:
newnegate! "text to find"! /categories/products.html

Does anyone know why?

thanks again,

Rick.

>From: Rose David <DRose at snyderdrug.com>
>To: "Nagiosplug-Help (E-mail)" <nagiosplug-help at lists.sourceforge.net>
>Subject: RE: [Nagiosplug-help] Questions using negate?
>Date: Thu, 6 Mar 2003 12:01:25 -0600
>
>Double checked to make sure, but check_ping does require both warning and
>critical settings, so omitting one is not possible.  By setting them the
>same though, the check should produce only an OK state or a CRITICAL state,
>as any time the threshold for a WARNING is crossed, so is the threshold for
>the CRITICAL state.
>
>As for other return codes, the new-negate is basically just changing any
>return code that is greater than 0 to 0 or any return code equal to 0 to 2.
>As I said, this does work off of the command line as it should, but when
>tested on both a reachable and non-reachable host in the Nagios 
>application,
>they both register as an OK state no matter what the check_ping plugin
>reports.
>
>Does Nagios just use return codes in determining an OK/CRITICAL state or is
>there something else it may be keying off of?  Or, do plugins behave
>differently in Nagios than they do on the command line?  Or does someone
>have a better answer as to why the negate plugin-wrapper won't work with
>check_ping?
>
>Any continued help would be appreciated.
>
> > -----Original Message-----
> > From: John Cockerham [mailto:jcockerham at mydoconline.com]
> > Sent: Thursday, March 06, 2003 7:35 AM
> > To: Rose David
> > Subject: RE: [Nagiosplug-help] Questions using negate?
> >
> >
> > Since you are using the same criteria to check for warning and critial
> > status, perhaps you can just omit one or the other.
> >
> > Ex.home/nagios/libexec/new-negate
> > /home/nagios/libexec/check_ping -H yournode -c 1000.0,100%
> >
> > In your case, the -p 5, is really not required, 5 is the default value
> > for this parameter and therefor does not need to be passed.
> >
> > I beleive that if you only check for critical this will limit
> > the return
> > codes to ether 0 for success and 2 for critical. The new-negate script
> > will then invert these.  The perl script. new-negate,  will have to be
> > changed if you wish to perform checks on multiple return codes.
> >
> > Good luck


_________________________________________________________________
MSN Instant Messenger now available on Australian mobile phones. Go to  
http://ninemsn.com.au/mobilecentral/hotmail_messenger.asp





More information about the Help mailing list