On Wed, 16 Apr 2008, Augustin Amann wrote:
> First, thank you for HAProxy, it's a REALY good soft !
> I need to graph bandwidth for different vhost on a particular ip address, and
> I'm wondering if there is a way to do that with HAProxy ...
> Has anyone else done things like this, or i'm going the wrong way ?
Just setup additional backends for each interesting vhost:
acl host_www.a.example.com hdr(host) -i www.a.example.com acl host_www.b.example.com hdr(host) -i www.b.example.com use_backend www.a.example.com if host_www.a.example.com use_backend www.b.example.com if host_www.b.example.com default_backend default
... and use your favorite method to get counters from the statistics. In most current snapshots you may use SNMP for this, README is located in: "contrib/netsnmp-perl/". You should also consider adding some constant ids for backends.
There are also two xmls for Cacti (haproxy_backend.xml, haproxy_frontend.xml) in that directory.
Krzysztof Olędzki Received on 2008/04/16 13:34
This archive was generated by hypermail 2.2.0 : 2008/04/16 13:45 CEST