[Nagiosplug-devel] new option to check_http

Ton Voon ton.voon at altinity.com
Fri Jun 2 10:15:09 CEST 2006


On 2 Jun 2006, at 00:17, sean finney wrote:

> hey folks,
>
> just wanted to throw this out there:
>
> currently, when checking http against a site that requires a user/ 
> pass,
> you'll get STATE_WARNING like this:
>
> bash$ ./check_http --ssl -H foo.bar.com
> HTTP WARNING: HTTP/1.1 401 Authorization Require
>
> however, what if i want to verify that a user/password are  
> required, but
> don't care about getting in?  one idea:
>
> - modify the -a (user:pass) to have it's optarg be optional, and if
>   not specified imply that we should just check to see if  
> authorization
>   is required (check for a status 401)
>
> another idea:
>
> - provide an option for "expected HTTP status line/code", which  
> takes an
>   integer/regex which matches against the server response code/ 
> line. and
>   exits CRITICAL if the server returns any other code.
>
> i think the second idea is a bit more general, and wasn't too hard to
> hack in (using the integer,code combo, didn't bother for the regex).
> however, i'm wondering what other people think before i make a commit.

I think the "expected status code" is a better option. I can see  
possibly wanting to test virtual hosts that redirect to a master  
site, so the second idea would cover this test too.

Ton

http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon






More information about the Devel mailing list