Bug#423461: [Pkg-nagios-devel] Bug#423461: http.cfg/check_http flawed
arguments (-H/-I confusion)
joy at debbugs.entuzijast.net
Sun May 13 08:43:53 UTC 2007
On Sun, May 13, 2007 at 10:34:04AM +0200, sean finney wrote:
> On Sat, 2007-05-12 at 16:51 +0200, Josip Rodin wrote:
> > Well, it's obviously not - that would require me to specify the first
> > argument. I didn't spend time adding host names (as in FQDNs) into nagios
> > settings just so I have to repeat the whole thing again! :)
> i was under the impression that if you added the hostname as a FQDN that
> the $HOSTNAME$ macro would resolve to this. am i incorrect?
It does, but check_http currently *isn't using* $HOSTNAME$, it's always
using $HOSTADDRESS$, for both -I and -H arguments.
That works fine if one was using DNS names in the 'address' fields, somewhat
contrary to the advice from the documentation. But if one were using
IP addresses in the 'address' fields, as I am, the script passes
'Host: 18.104.22.168' in the HTTP requests and you can just get the default
virtual host (which can be a 4xx so the check fails).
> anyway if you have a suggest for a new check, feel free to provide it
> and i don't have any problem adding it (if you're really fast, i should
> be uploading 2.8 some time today)
Like I said, in my case, the -H argument should simply be changed to use
For people who inserted random fodder as 'host_name', this may cause
occasional problems (because their web servers might not respond well
to HTTP headers such as 'Host: My Wonderful New Web Server!!1!' :).
Question is - how many people used DNS names as 'address' and junk for
'host_name'? There's no way to find out...
2. That which causes joy or happiness.
More information about the Pkg-nagios-devel