[Nagiosplug-help] check_http - how to output failing url + failing regexp?

Steffen Poulsen sp at tdchosting.dk
Tue Aug 11 11:23:39 CEST 2009


Hi all,

When a check_http check fails, it looks like there is currently no information in the nagios console, regarding on _what_ condition the check failed exactly.

We were wondering if there was a reason this information is not reported already? It would indeed be very helpful to those working with the alerts to see i.e. what url and what string/regex failed exactly.

A couple of examples on current output:

Current output, OK:
./check_http -H fqdn -u /self_check.php -p 80 -w 5 -c 10 -t 60 -e "200" -s "EVERYTHING_IS_OK"
HTTP OK HTTP/1.1 200 OK - 0.328 second response time |time=0.327952s;5.000000;10.000000;0.000000 size=815B;;;0

Current output, string not found:
./check_http -H fqdn -u /self_check.php -p 80 -w 5 -c 10 -t 60 -e "200" -s "EVERYTHING_IS_OK"
CRITICAL - string not found|time=0.025742s;5.000000;10.000000;0.000000 size=815B;;;0

Current output, unexpected response code:
./check_http -H fqdn -u /self_check.php -p 80 -w 5 -c 10 -t 60 -e "200" -s "EVERYTHING_IS_OK"
Invalid HTTP response received from host

The output for the OK scenario is OK, I believe, but we would like to decorate the output for the other scenarios, perhaps along this line:

Improved output, string not found:
./check_http -H fqdn -u /self_check.php -p 80 -w 5 -c 10 -t 60 -e "200" -s "EVERYTHING_IS_OK"
CRITICAL: http:// fqdn/self_check.php - String not found: EVERYTHING_IS_OK|time=0.025742s;5.000000;10.000000;0.000000 size=815B;;;0

Improved output, unexpected response code:
./check_http -H fqdn -u /self_check.php -p 80 -w 5 -c 10 -t 60 -e "200" -s "EVERYTHING_IS_OK"
CRITICAL: http:// fqdn/self_check.php - Header content not found: 200|time=0.025742s;5.000000;10.000000;0.000000 size=815B;;;0

We looked around for other check_http plugins that might be more "human-oriented" in their output, but found none - so we believe our best bet is to try to decorate this one, unless there's a good reason not to.

Steffen

--

Venlig hilsen / Best regards

Steffen Poulsen
UNIX System Administrator
TDC Hosting A/S
Phone: +45 70 26 25 27
E-mail: sp at tdchosting.dk<mailto:ba at tdchosting.dk>
Web: www.tdchosting.dk<http://www.tdchosting.dk/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20090811/7ee34137/attachment.html>


More information about the Help mailing list