[Nagiosplug-devel] [ nagiosplug-Bugs-3434735 ] check_http failing with proxy server

SourceForge.net noreply at sourceforge.net
Wed Jun 27 10:03:13 CEST 2012

Bugs item #3434735, was opened at 2011-11-07 18:21
Message generated for change (Settings changed) made by hweiss
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Interface (example)
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stuart Bryson (bigc9heese)
>Assigned to: Holger Weiss (hweiss)
Summary: check_http failing with proxy server

Initial Comment:
I've been using v1.4.11 of the check_http plugin to check the Internet via the proxy as such:
./check_http -I -p 8080 -u http://www.google.com.au/ -t 40 -H
This worked great, see below:

GET http://www.google.com.au/ HTTP/1.0
User-Agent: check_http/v1861 (nagios-plugins 1.4.11)
Connection: close
Host: is 10873 characters
**** HEADER ****
Via: 1.1 companyscm
Date: Tue, 08 Nov 2011 02:20:04 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Connection: close
**** CONTENT ****

When I upgraded to v1.4.15 - it fails:

GET http://www.google.com.au/ HTTP/1.1
User-Agent: check_http/v1.4.15 (nagios-plugins 1.4.15)
Connection: close
Host: is 232 characters
STATUS: HTTP/1.1 503 Service Unavailable
**** HEADER ****
Retry-After: 10
**** CONTENT ****
<HTML><HEAD><TITLE>502 Bad Gateway</TITLE>
<H2>Bad Gateway</H2>
<H4>The following error occurred:</H4>
The host name was not found during the DNS lookup

HTTP CRITICAL: HTTP/1.1 503 Service Unavailable - 232 bytes in 21.016 second response time |time=21.016469s;;;0.000000 size=232B;;;0

Something changed that stopped this. Is it possible to be fixed?
If it isn't a bug, please let me know what I'm doing wrong.


Comment By: Ferenc Wágner (wferi)
Date: 2011-11-08 08:15

A guess: your proxy blindly tries to resolve from DNS
(notice that the newer plugin sticks the port number in the Host header).
The HTTP protocol version in the request may also make a difference.
Experiment with telnet 8080 to find out what matters for your


You can respond by visiting: 

More information about the Devel mailing list