Check_http with size and regex conditions ignoring size check.

Marc Powell marc at ena.com
Thu Feb 23 17:21:49 CET 2006



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Andrew Laden
> Sent: Thursday, February 23, 2006 9:40 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Check_http with size and regex conditions
ignoring
> size check.
> 
> I want to check a web page, and check both for a regex and for a
minimum
> size.
> 
> However, it appears that the regex requirement overides the size. Eg.
> (names changes to protect the innocent)
> check_http (nagios-plugins 1.4.1) 1.81
> 
> aladen at host> check_http -H servername -p 8080 -u "uri" -r "REGEX
CHECK"  -
> m 60:100
> HTTP OK HTTP/1.1 200 OK - 0.420 second response time
> |time=0.419695s;;;0.000000 size=2405B;60;0;0
> 
> aladen at host> check_http -H servername -p 8080 -u "uri"  -m 60:100
> HTTP WARNING: page size 2405 too large|size=2405B;60;0;0
> 
> Is this a bug in check_http?

Technically no it's not a bug, the command line arguments are not
compatible. Looking around line 1030 and forward of check_http.c, the
regex tests and size tests are not progressive. The order (from there
forward) is header checks, regex checks then size checks. Each will exit
the program based on *success* or failure of the check. I would call it
a feature request to have checks be progressive. On success, continue to
the next test...  You might want to bounce this over to the
nagiosplug-devel list for their consideration.

--
Marc


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
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