[Nagiosplug-devel] FW: Nagiosplug-devel Digest, Vol 37, Issue 6

Mark Mathieson Mark.Mathieson at concepts.co.nz
Sun Jun 14 23:29:08 CEST 2009


Greetings All,

So many responses to my check_http proxy query!  Thank you all.

I do, however, have another spanner to throw in the works, as below: proxy authentication.  ;)

> I'm not against supporting proxies in check_http, but in the mean time
> you could try that:
> 
> > $ plugins/check_http -I localhost -H www.w3.org -u
> http://www.w3.org/pub/WWW/TheProject.html -vvv
> > GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1
> > User-Agent: check_http/v1.4.13.133.g18d6.dirty (nagios-plugins 1.4.13)
> > Connection: close
> > Host: www.w3.org

I tried this, and it works fine as long as your proxy doesn't require authentication.  Of course, at least one of the ones I monitor requires authentication.

Check via unauthenticated proxy:
---
# ./check_http -vvv -I 192.168.0.8 -p 3128 -H www.google.com -u http://www.google.com/index.html

GET http://www.google.com/index.html HTTP/1.0
User-Agent: check_http/v2053 (nagios-plugins 1.4.13)
Connection: close
Host: www.google.com:3128

http://192.168.0.8:3128http://www.google.com/index.html is 826 characters
[snip body]

HTTP OK - HTTP/1.0 302 Moved Temporarily - 0.332 second response time |time=0.332021s;;;0.000000 size=826B;;;0
---

Check via authenticated proxy (details provided for <proxy>/<user>/<pw>)
---
# ./check_http -vvv -I <proxy IP> -p 8081 -a <user>:<pw> -H www.google.com -u http://www.google.com/index.

GET http://www.google.com/index.html HTTP/1.0
User-Agent: check_http/v2053 (nagios-plugins 1.4.13)
Connection: close
Host: www.google.com:8081
Authorization: Basic bGRhcDpsZGFwcXVlcnk=
CRITICAL - Socket timeout after 10 seconds
---

Any thoughts?  I think the problem is that the -a switch is a reference to authentication on the Host only.  Not sure how to pass authentication to the proxy.

Note also that I am checking from the Nagios box itself, as I am trying to determine functionality of the web access, rather than from the W2K3 server that acts as the proxy.
 
Cheers,
Mark

Notice of confidential information:
The information contained in this e-mail message is 
confidential information and may also be legally privileged, 
intended only for the individual or entity named above.  
If you are not the intended recipient you are hereby
notified that any use, review, dissemination, distribution
or copying of this document is strictly prohibited.
If you have received this document in error, please 
immediately notify the sender by telephone and destroy the
message. Thank you.

Any pricing quoted in this email is exclusive of GST and freight 
and is only valid while stocks are available at the quoted price.




More information about the Devel mailing list