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

BOLLENGIER Eric ebollengier at sigma.fr
Mon Oct 28 10:56:03 CET 2002


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