[Nagiosplug-help] Change in check_http behavior, and how to disable?
Chris Knight
boheme at gmail.com
Tue Oct 21 02:54:40 CEST 2008
Heh. Nevermind. I see this behavior was fixed in nagios-plugins 1.4.13
-Chris
On Mon, Oct 20, 2008 at 5:35 PM, Chris Knight <boheme at gmail.com> wrote:
> For over a year I've had a fairly simple http check in place, and one
> day a few weeks back it suddenly stopped working after an update of my
> nagios plugins. The check is fairly simple:
>
> /opt/local/libexec/nagios/check_http -H download.gamevideos.com -u /favicon.ico
>
> The check fails, but using the URL
> http://download.gamevideos.com/favicon.ico in wget, or a web browser,
> works fine.
>
> I tracked down the issue to a change in the Host header that
> check_http is sending. It appears that in a recent update to
> check_http started adding the default port (80) to the Host header.
>
> So, where wget issues:
>
> wget http://download.gamevideos.com/favicon.ico
>
> GET /favicon.ico HTTP/1.0
> User-Agent: Wget/1.11.4
> Accept: */*
> Host: download.gamevideos.com
> Connection: Keep-Alive
>
> check_http sends this:
>
> /opt/local/libexec/nagios/check_http -H download.gamevideos.com -u /favicon.ico
>
> GET /favicon.ico HTTP/1.0
> User-Agent: check_http/v1991 (nagios-plugins 1.4.12)
> Connection: close
> Host: download.gamevideos.com:80
>
> While RFC 2616 does indicate that adding :PORT to the Host header is
> valid, this can be a problem when the website in question is behind a
> content switch that is doing exact matches on the Host header. In my
> case, I wound up adding an additional set of rules to match the
> host:port host header, but it sure would have been nice to have a
> command line flag I could have used on check_http to disable this new
> behavior.
>
> Just wondering if this has bitten anyone else, and thought I would
> share in case this was an active problem for anyone.
>
> -Chris
>
More information about the Help
mailing list