Anyone knows how to setup haproxy to get stats out of it?

Looking for help on how to get stats from Deploy Haproxy using Charmhub - The Open Operator Collection

The documentation claims that some “statsd” server can be used.

@martin-hilton seems to have worked with this code and might know?

The documentation could do with some updating here, but the recommended way to do this would be to deploy the telegraf subordinate charm:

juju deploy cs:haproxy
juju deploy cs:telegraf
juju relate telegraf:juju-info haproxy
juju relate telegraf:haproxy haproxy

You can then query http://${unit_ip}:9103/metrics to get a bunch of metrics.

I’ll work on getting the docs updated next week.

1 Like

This is awesome. It’s really useful for us trying to pursue some performance related issues


Would you be interested in joining me in a hands on workshop in a few weeks to demonstrate how the haproxy works with a website charm?

I hosted a getting started workshop today which was great fun. Also super valuable for people that can get a chance to learn how it works.

Have you seen this @mthaddon ?

I would say that operating haproxy via dataplane API would be highly desirable when configurations are getting more complex and Juju-configs via relation or configs starts getting out of hand…

Perhaps a subordinate or something would be useful here… Not sure how others are doing it.

Looks interesting. Will definitely bear that in mind for future changes to this charm.

1 Like

Totally. We use the dataplane API as the most flexible and reliant was to configure haproxy.

It supports transactional configuration as well which is very useful with complex configuration.

Furthermore it use inotify, so it picks up changes to file (manual) config as well.