[Nagiosplug-devel] FW: [Nagios-users] Check_http with size and regex conditions igno ring size check.

Andrew Laden Andrew.Laden at tudor.com
Thu Feb 23 10:45:02 CET 2006


 Bouncing request to plugdevel.

Can the check_http plugin handle multiple conditions. Ie, check both for a
regex and for a minimum size.

Thanks
-Andrew

> > 
> > 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
> 




More information about the Devel mailing list