[Nagiosplug-devel] Add a reverse option to check_http.c

BOLLENGIER Eric ebollengier at sigma.fr
Tue Oct 29 00:25:02 CET 2002


Hi,

I'am ok to use negate, but on nagios site, it look quite strange..

./negate check_http -I somehost -s '[A-Z]+ : ERR' -u /monitor.php
GREEN : HTTP CRITICAL: string not found|time=  0.007

But results are ok... It can confuse users. 

Thank for your help !

Eric

Le lun 28/10/2002 à 20:20, Subhendu Ghosh a écrit :
> 
> try using "negate" to reverse the CRITICAL to OK 
> 
> you can find it in CVS.
> 
> -sg
> 
> 
> On 28 Oct 2002, BOLLENGIER Eric wrote:
> 
> > Hi,
> > 
> > It seems to be usefull to reverse -r|-R|-s switch result.
> > 
> > For example, i have a monitor.php script which test a webserver
> > (connection to a database, php engine on etc..) and it return OK if it's
> > good or ERR if doesn't. I try to find ERR
> > 
> > I want to use 
> > ./check_http -I somehost --reverse -r '[A-Z]+ : ERR' -u /monitor.php -v
> > 
> > Page is 424 characters
> > STATUS: HTTP/1.1 200 OK
> > **** HEADER ****
> > Date: Sun, 27 Oct 2002 10:58:59 GMT
> > Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.2.2
> > X-Powered-By: PHP/4.2.2
> > Connection: close
> > Content-Type: text/plain; charset=iso-8859-1
> > **** CONTENT ****
> > BASEC : ERR
> > ==>2002: Can't connect to local MySQL server through socket...
> > BASES : ERR
> > ==>2002: Can't connect to local MySQL server through socket ...
> > PHP : OK
> > 
> > HTTP CRITICAL: pattern found
> > 
> > Patch : 630031 on sf.net
> > 
> > cd nagiosplug-1.3-beta1/
> > patch -p0 < /tmp/check_http.c.patch 
> > 






More information about the Devel mailing list