[Nagiosplug-help] Check_http & https

Thomas Guyot-Sionnest dermoth at aei.ca
Wed Nov 26 13:52:29 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 25/11/08 03:58 AM, Oliver Devoogdt wrote:
> I have an issue when I put it a proxy (with the -I) option & https websites.
> 
> Whatever I give with the -u option, I always receive a "HTTP OK ". It seems that he doesn't check the url, even when there is a typo into it.
> 
> [root at nagios-vm objects]#  /usr/local/nagios/libexec/check_http  -I 172.18.20.5 -p 8080 -u "https://www.xxxx.yyyy.com"
> HTTP OK HTTP/1.0 200 OK - 102 bytes in 0.002 seconds |time=0.001537s;;;0.000000 size=102B;;;0
> 
> 
> What am I doing wrong ?

- -I is not a proxy address, it's the web server address to connect to. -u
should be only the path component of the url ("/", "/foo/bar.html",
etc.). -H can be used together with -I to provide host headers without
having to resolve the IP.

So right now your request is equivalent to this (NB: the port is glued
to the path because it's not starting with a /):

http://172.18.20.5:8080https://www.xxxx.yyyy.com

It appears that at least some web servers accept full URIs in the GET
request, strip protocol/hostname part and take the URL at the end (or
"/" of there no URL), which explains why you get 200 OK.

BTW you can use "-vvv" to print all debug output...

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJLUaM6dZ+Kt5BchYRAuJDAJ4jxXbY0GJG04NtorwETy5iafnSpQCgxnqY
KqS4PrNqIkJ1nAu6cXpHaI4=
=MDug
-----END PGP SIGNATURE-----




More information about the Help mailing list