[Nagiosplug-devel] [ nagiosplug-Bugs-3434735 ] check_http failing with proxy server
Bryan Irvine
bryair01 at noa.nintendo.com
Thu Jun 28 03:47:05 CEST 2012
I pasted the exact same command you used and it worked on my proxy.
The name difference is because I'm using it with zenoss, which includes check_http from 1.4.13 in the same dir.
$ /opt/zenoss/libexec/check_http_proxy -I proxysg -p 8080 -u http://www.google.com.au/ -t 40 -H 74.125.237.16
HTTP OK: HTTP/1.1 200 OK - 14679 bytes in 0.131 second response time |time=0.130708s;;;0.000000 size=14679B;;;0
My guess is that the proxy is trying to get the remote site also using port 8080.
See if this works for you.
./check_http -I 10.1.0.228 -p 8080 -u http://www.google.com.au/ -t 40 -H 74.125.237.16:80
-----Original Message-----
From: SourceForge.net [mailto:noreply at sourceforge.net]
Sent: Wednesday, June 27, 2012 1:31 AM
To: SourceForge.net
Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3434735 ] check_http failing with proxy server
Bugs item #3434735, was opened at 2011-11-07 18:21
Message generated for change (Comment added) made by piccilli
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3434735&group_id=29880
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 10.1.0.228 -p 8080 -u http://www.google.com.au/ -t 40 -H 74.125.237.16
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: 74.125.237.16
http://10.1.0.228:8080http://www.google.com.au/ is 10873 characters
STATUS: HTTP/1.1 200 OK
**** 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: 74.125.237.16:8080
http://10.1.0.228:8080http://www.google.com.au/ 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>
<H4>
The host name was not found during the DNS lookup
</H4>
</HTML>
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.
Thanks.
----------------------------------------------------------------------
Comment By: Leandro Piccilli (piccilli)
Date: 2012-06-27 01:28
Message:
You can try a patch I created for a similar issue:
https://sourceforge.net/mailarchive/message.php?msg_id=29399782
It adds a new option '--force-http-1.0' to use same behavior as previous
check_http versions.
----------------------------------------------------------------------
Comment By: Ferenc Wágner (wferi)
Date: 2011-11-08 08:15
Message:
A guess: your proxy blindly tries to resolve 74.125.237.16:8080 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 10.1.0.228 8080 to find out what matters for your
proxy.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3434735&group_id=29880
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________________
Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Devel
mailing list