Re: contribution for monitoring

From: Willy Tarreau <w#1wt.eu>
Date: Wed, 14 Nov 2007 09:08:56 +0100


Hi Julien,

On Tue, Nov 13, 2007 at 09:41:17AM +0100, julien antony wrote:
> sorry the complete script is at
>
> http://pastebin.ca/raw/771836

Thanks for this contrib!
Since socat is not installed everywhere, I suggest that you first initialize a variable with its path so that the user can easily change it :

SOCAT=${SOCATPATH:-/usr/bin/socat}

Also, it's often annoying to rely on a hard-coded path when people have their PATH correctly set.

You can use the "type" shell command to look for the binary in a valid path :

if ! type socat 2>/dev/null; then

   echo "can't find socat in PATH"
   exit 1
fi

I can merge your script in the official package if you want. For this, just send me what you consider your last version and the name you want to give to the script (eg: stats_haproxy.sh), and I will do the rest.

Thanks,
Willy Received on 2007/11/14 09:08

This archive was generated by hypermail 2.2.0 : 2007/11/14 09:45 CET