[Nagiosplug-devel] Check_http suggestion

Marc Powell marc at ena.com
Thu Jun 11 18:46:15 CEST 2009

On Jun 11, 2009, at 11:22 AM, Matthias Eble wrote:

> Am Mittwoch, den 10.06.2009, 21:24 +0200 schrieb Hiren Patel:
>> Mark Mathieson wrote:

> To me, specifying the proxy to use should be a command line argument
> rather than env-var. It can then be easily specified in the nagios/ 
> nrpe
> config.

I concur. It's clearer and easier to troubleshoot problems.

> With current version you can specify -I to define where the tcp socket
> connects to. -H is then used to select the requested name in the http
> "Host:" header. So -I proxy -H www.google.com should work but will not
> function with SOCKS (not 100% sure though).

Yes, the use of -I and -H works. I use that methodology to check  
several urls through several hundred proxies... Can't comment about  
SOCKS though...

     	command_line                   $USER1$/check_http -H $ARG1$ -I  
$HOSTADDRESS$ -p 8080 -wt 20 -ct 30 -to 35 -u http://$ARG1$ -s $ARG2$
	check_command                   check_filt!www.myspace.com!block.cgi

> nother drawback is that
> with current implementation, the proxy you use use must listen on the
> same port as the website you're requesting does since tcp connect and
> Host header use the same variable (-p).
>> personally I think it's a good idea, it could be useful in cases like
>> yours, would a patch for this be accepted? I'd be prepared to work on
>> this if core developers would accept it?

There's no need as far as I can tell. Maybe it's some voodoo from the  
proxies I use but I don't believe so --

$ ~nagios/libexec/check_http -v -I cache01.davidson.tn.ena.net -p 8080  
-H transamrit.net -u http://transamrit.net:8082
GET http://transamrit.net:8082 HTTP/1.0
User-Agent: check_http/1.89 (nagios-plugins 1.4.3)
Host: transamrit.net

http://cache01.davidson.tn.ena.net:8080http://transamrit.net:8082 is  
14868 characters
**** HEADER ****
Content-Type: text/html; charset=iso-8859-1
Via: 1.1 cache01.davidson
Content-Length: 14690
Connection: close
Age: 0
Date: Thu, 11 Jun 2009 16:41:13 GMT
**** CONTENT ****
<title>BNBT Tracker Info</title>

HTTP OK HTTP/1.1 200 OK - 14868 bytes in 0.703 seconds | 
time=0.703203s;;;0.000000 size=14868B;;;0


More information about the Devel mailing list