httping through proxy

Marc Powell marc at ena.com
Mon Sep 25 23:20:19 CEST 2006



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of naim abu darwish
> Sent: Monday, September 25, 2006 3:39 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] httping through proxy
> 
> hello.
> I'm trying to monitor browsing performance through proxies. httping (
> http://www.vanheusden.com/httping/ )is  like ping but for
> http-requests.
> check command example is  something like ::
> 
> httping -h www.google.com -x 192.168.20.24:8080 -c 1 -t 2
> 
> where the variables are ::
> 1) 192.168.20.24 is the ip address of the proxy, corresponding to
> $$HOSTADDRESS$$
> 2) 8080  is the port number that the squid proxy is running on, this
> could be corresponding to $ARG1$
> 
> Could anyone please tell me how to put this in a way nagios
> understands. Its something close to what i did below, but i cant quiet
>  figure it out yet.
> the mistake is somewhere with the colon ( : ), i think.
> 
> ###  from the file   /etc/nagios/checkcommands.cfg
> 
> 
> define command{
>         command_name    check_httping
>         command_line       /usr/bin/httping -x $HOSTADDRESS$ : $ARG1$
> -c 1 -h  www.google.com
>         }

The spaces around the : are likely to be your current problem. You were
probably trying for something like --

command_line /usr/bin/httping -x $HOSTADDRESS$:$ARG1$ -c 1 -h
www.google.com

That would at least get httping running _BUT_ unless httping exits with
the standard nagios exit codes to denote state and follows the nagios
output guidelines (in the Developer Docs at http://nagiosplug.sf.net),
you'll need to create a wrapper script for it so that it does. This is
almost certainly going to be necessary. Essentially you'll need to look
at the output of httping and determine if it's OK, WARNING, CRITICAL or
UNKNOWN and tell nagios appropriately. At the minimum you'll need to
follow the 'Print only one line of output' and 'Plugin Return Codes'
section of that documentation. 

--
Marc 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list