[Pkg-nagios-devel] Bug#722482: check_http: fix for different virtual port

Christopher Odenbach odenbach at uni-paderborn.de
Wed Sep 11 14:58:24 UTC 2013

Package: nagios-plugins
Version: 1.4.16-1
Severity: normal
Tags: patch upstream

Dear Maintainer,

we have two webservers behind a loadbalancer. The LB acts as a NAT and
PAT gateway, so requests to www.uni-paderborn.de:80 are forwarded to
siri1.uni-paderborn.de:5033 and siri2.uni-paderborn.de:5033.

Now I want to monitor both webservers, not only the LB. So I want to
use check_http with the following options:

check_http -I siri1 -p 5033 -H www.uni-paderborn.de:80

But in this case the current version of check_http (also checked the version in
unstable, same result) creates an HTTP request to siri1:80 which is wrong.

If I leave out the ":80" in the virtual host the request is wrong also:

check_http -I siri1 -p 5033 -H www.uni-paderborn.de -v | grep Host
Host: www.uni-paderborn.de:5033

So the plugin does distinguish between physical and virtual host names,
but it does NOT distinguish between physical and virtual ports.

I have already reported this bug upstream as bug id 3442015 two years ago
but have never received any answer. A patch was included also. This patch
still applies cleanly to the current version.



-- System Information:
Debian Release: 7.1
  APT prefers stable
  APT policy: (700, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages nagios-plugins depends on:
ii  nagios-plugins-basic     1.4.16-1
ii  nagios-plugins-standard  1.4.16-1

Versions of packages nagios-plugins recommends:
pn  nagios-plugins-contrib  <none>

Versions of packages nagios-plugins suggests:
ii  icinga  1.7.1-6

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15_check_http_virtual_ports.dpatch
Type: text/x-shellscript
Size: 3233 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20130911/8bfd54d9/attachment.bin>

More information about the Pkg-nagios-devel mailing list