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 [mailto:[email protected]]
Sent: Friday, February 06, 2009 8:55 AM
To: [email protected]
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