[Nagiosplug-devel] new option to check_http

John P. Rouillard rouilj at cs.umb.edu
Fri Jun 2 21:11:44 CEST 2006


In message <20060601231758.GA23476 at seanius.net>,
sean finney writes:
>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:
> [...]
>another idea:
>  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.

Isn't that precisely what -e already does?

 -e, --expect=STRING
   String to expect in first (status) line of server response
   (default: HTTP/1.) If specified skips all other status line logic
   (ex: 3xx, 4xx, 5xx processing)

				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.




More information about the Devel mailing list