Check status codes with check_http

MT Morales nagios at pensol.net
Thu Apr 8 19:38:25 CEST 2004


Could someone suggest a good way of checking more than one status code 
on a webserver. check_http allows you to check, with "-e" option, one 
code response:
check_http -H webserver -e 200  (for 200 OK)

but I also need to consider code 304 to be ok. So far using the "-r" 
option has been my only workround:

check_http -H webserver -r "(200|304)"

The above checks the entire output though, as opposed to the first 
(status) line. Does anybody have a cleaner way of checking 2 status 
codes so that it is critical when the response code is different than 
200 or 304?

thanks in advance for any suggestions.
-Tomas





-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list