[Nagiosplug-help] Check_http & https
dermoth at aei.ca
Wed Nov 26 13:52:29 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
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 /):
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...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Help