RE: statistic of haproxy

From: John Lauro <>
Date: Fri, 6 Feb 2009 09:30:07 -0500

If you put something like the following in global:

stats socket /var/lib/haproxy-stat mode 777  

Here is some quick items I hacked together for zabbix: (should be easy enough to put into nagios, or mrtg, or whatever)

UserParameter=proxyconn,echo "show info" | /usr/local/bin/socat
/var/lib/haproxy-stat stdio | grep CurrConns | awk '{ print $2 }'

UserParameter=proxytotconn,echo "show stat" | /usr/local/bin/socat
/var/lib/haproxy-stat stdio | grep ,BACKEND, | awk -F, '{ tot = tot + $8 }
END { print tot }'

UserParameter=proxytoterr,echo "show stat" | /usr/local/bin/socat
/var/lib/haproxy-stat stdio | grep ,BACKEND, | awk -F, '{ tot = tot + $14 +
$15 } END { print tot }'  

I think there is also an SNMP agent that you could use, but haven't tried that.  

From: vmware vmware [] Sent: Friday, February 06, 2009 8:55 AM
Subject: statistic of haproxy  

Dear Willy Tarreau!

I started to work with haproxy a couple of days ago. I would like to display the data shown in the statisic of haproxy in the monitoring tool Nagios. I would like to develop a plugin which does this work for me. Can you tell me where the data presented in the web site (which is provided by haproxy) is collected so that I can read it out?

Many thanks

Maria Received on 2009/02/06 15:30

This archive was generated by hypermail 2.2.0 : 2009/02/06 16:45 CET