[Nagiosplug-devel] check_http bug?
Thomas Guyot-Sionnest
dermoth at aei.ca
Wed Mar 17 10:29:51 CET 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/02/10 06:47 PM, David Beuving wrote:
> Hello,
>
> I have found a certain behavior in the check_http plugin that seems like
> a bug to me.
>
> When using the plugin in verbose mode, it responds showing this as part
> of the report:
>
> http://ipaddress:port/path
>
> This leads me to believe that it is sending the ipaddress as the host
> header rather than the hostname, but after looking at the code it is
> clear the check works by sending the hostname it simply shows ipaddress
> in the verbose response.
>
> I have replaced line 912 in check_http.c:
> use_ssl ? "https" : "http", server_address,
> with
> use_ssl ? "https" : "http", host_name ? host_name : server_address,
>
> Please let me know if this is a bug and something you will update in the
> next release or if it is meant to work this way.
Verbose output is mostly for debugging, and since the server's IP
address can be forced I believe this is correct - i.e. this is where
check_http connects, and the host header can be found in the output as well.
If you specify -H only it shows the hostname there, because in that case
server_address is copied from host_name.
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFLoKEP6dZ+Kt5BchYRAn6gAJ96i9ooNPwgA6D7Vwa7gluvZr+YhACgiHlx
Q4suqkcWHEVo/yMecqBw0fU=
=WDt0
-----END PGP SIGNATURE-----
More information about the Devel
mailing list