[Nagiosplug-help] check_http content checking

jim nagios at nachlin.com
Thu Sep 23 05:48:03 CEST 2004


Use the check_http plugin's -s option.  THis checks for a string in the 
HTML.

# ./libexec/check_http -H kinja.com -s world
HTTP ok: HTTP/1.1 200 OK -   0.008 second response time |time=  0.008

# ./libexec/check_http -H kinja.com -s worszzz
HTTP CRITICAL: string not found|time=  0.006


Dmitry Chorine wrote:
> Hi
> 
> Is there a way for check_http or any other plugin work around to check
> specific string from the content of http page not in headers, for
> instance I have a _virtual_ domain www.example.com and I want to make
> sure that this is up, so I use check_http -H www.example.com -p 80 -e
> hello, but when I use -e it only checkes header that I get from using -v
> 
> Page is 1685 characters
> STATUS: HTTP/1.1 200 OK
> **** HEADER ****
> Date: Wed, 22 Sep 2004 21:51:46 GMT
> Server: Apache
> Last-Modified: Mon, 28 Jun 2004 19:25:44 GMT
> ETag: "92b467-596-aff39e00"
> Accept-Ranges: bytes
> Content-Length: 1430
> Connection: close
> Content-Type: text/html; charset=ISO-8859-1
> **** CONTENT ****
> 
> Not even headers.. Only "STATUS" pre-header or whatever it called, but I
> need for plug in is actually to download that page like any browser
> would do and check for a content for specific string.
> 
> 
> Thank you in advance
> 
> 
> Dmitry Chorine
> Network/Systems Engineer
> 
> Heartbeat Digital LLC
> 110 Greene Street,  Suite #600
> Manhattan, New York 10012
> Tel: +1(212)941-9041
> Fax: +1(212)941-9853
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null




More information about the Help mailing list