Nagios HTTP Proxy Plugin

(Listed on Nagios Exchange here: http://exchange.nagios.org/directory/Plugins/Network-Protocols/HTTP/check_http_proxy/details)

I've written two versions (in python) of a nagios plugin to check HTTP Proxies. The plugin includes testing:

In all places I've endeavoured to capture the errors that might occur and return them in a way that will produce useful information within Nagios.

I wrote this originally using python 2.6 but then needed it to run on python 2.5 so created a back-ported version for that server.

Usage looks like this:

$ check_http_proxy --proxy=proxy:port --auth=user:pass --url=url --timeout=10.5 --warntime=5.0 --expect=content

While the Nagios configuration I'm using looks like:

define command{
        command_name    check_http_proxy
        command_line    /etc/nagios2/mysite-bin/check_http_proxy_python2.5 "--proxy=$ARG1$" "--auth=$ARG2$" "--warntime=$ARG3$" "--expect=$ARG4$" "--url=$ARG5$"
}

Here are the two versions:

BradsWiki: Programming Notes/Nagios HTTP Proxy Plugin (last edited 2011-08-11 01:24:02 by BradleyDean)