[Nagiosplug-devel] Check_http suggestion

Matthias Eble PsychoTrahe at gmx.de
Thu Jun 11 18:22:44 CEST 2009


Am Mittwoch, den 10.06.2009, 21:24 +0200 schrieb Hiren Patel:
> Mark Mathieson wrote:
> > I was wondering if anyone had considered forcing, or at least allowing, 
> > the check_http plug-in to use the local *_proxy variables.  It doesn’t 
> > appear to use them at the moment.

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.


> > It may seem an odd sort of request, so I’ll explain the situation 
> > briefly.  I have a Nagios server that can see the outside world 
> > directly, but all of the internal users use a proxy.  I’m running 
> > check_http to verify that web access is available to users and various 
> > internal services.  Thing is, because the existing check_http doesn’t 
> > use a proxy but the users do, if the proxy link goes down, Nagios thinks 
> > everything is fine and I don’t find out that it’s not until users start 
> > screaming.

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). Another 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?

I wouldn't mind if the implementation is clean and backward compatible.
As said, the environment thing would be something I would not like so
much - and probably refuse depending on team's feedback. Also providing
proper test cases of course makes it easier for us to commit
enhancements.

Matthias






More information about the Devel mailing list