check_http with ssl and auth


#1

Hello - I am trying to use check_http to monitor an SSL site that is also using basic HTTP auth. the plugin returns an error state, that if I’m reading the src correctly appears to be a generic error. If I use wget with the same parameters I do get proper results, so I am assuming there is perhaps a bug in check_http when using both HTTPS and AUTH ? Here’s a snippet with the actual hosts info changed to protect the innocent:

/usr/local/nagios-client/libexec/check_http --authorization=bob:bob --ssl -w 5 -c 10 -H some.site.com -v
GET / HTTP/1.0
User-Agent: check_http/1.104 (nagios-plugins 1.4.9)
Host: some.site.com
Authorization: Basic Ym1jZ2xpbmNoZXk6d2VsY29tZQ==

HTTP CRITICAL - Error on receive

wget output
wget -S --http-user=bob --http-password=bob
some.site.com
–11:45:41-- some.site.com/
Resolving some.site.com… 10.1.1.4
Connecting to some.site.com|10.1.1.4|:443… connected.
HTTP request sent, awaiting response…
HTTP/1.1 302 Redirect
Content-Length: 165
Content-Type: text/html
Location: some.site.com/exchange/
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Mon, 27 Aug 2007 17:43:28 GMT
Connection: keep-alive
Location: some.site.com/exchange/ [following]
–11:45:42-- some.site.com/exchange/
Reusing existing connection to some.site.com:443.
HTTP request sent, awaiting response…
HTTP/1.1 200 OK
Connection: keep-alive
Date: Mon, 27 Aug 2007 17:43:28 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Set-Cookie: sessionid=7d7790c5-5086-4754-b963-bd20c49315b8:0x0; path=/exchange
/
Content-Type: text/html
Content-Length: 1126
MS-WebStorage: 6.5.7638
MS-WebStorage: 6.5.7638
X-Powered-By: ASP.NET
Cache-Control: no-cache
Length: 1126 (1.1K) [text/html]


#2

Ignore the above- I was getting a 302 and wasn’t handling it with the -f. Sometimes it helps to post to make you reread something!