Expose prometheus metrics

Bug #1824568 reported by Tom Haddon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Content Cache Charm
Fix Released
Medium
Nick Moffitt

Bug Description

Per [1] HAProxy supports exposing a prometheus metrics endpoint. We should look into this and see if it's feasible to do this for the content-cache charm.

[1] https://www.haproxy.com/blog/haproxy-exposes-a-prometheus-metrics-endpoint/

Related branches

Revision history for this message
Tom Haddon (mthaddon) wrote :

It seems like this is only supported in the 2.x series, which is due for release this summer, so this won't be suitable yet.

However, we should see if https://github.com/prometheus/haproxy_exporter is a good option, or whether there's a telegraf plugin for HAProxy that supports similar metrics.

Revision history for this message
Tom Haddon (mthaddon) wrote :

We should be able to do this relatively cheaply by looking at the telegraf haproxy relation. This is implemented in the haproxy charm as the statistics relation, the relevant portion of which seems to be https://pastebin.ubuntu.com/p/8qgrkJxKqq/. Obviously there's a little more to it than that as there are functions referenced there, but this should be the approach we take.

Changed in content-cache-charm:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Tom Haddon (mthaddon) wrote :

If we do take this approach, we should be sure to name the relation on the content-cache side in such a way that we could later implement a similar approach for the nginx portion if appropriate, so rather than calling the relation "statistics" as the haproxy charm does, maybe "haproxy-statistics" would be better.

Changed in content-cache-charm:
assignee: nobody → Nick Moffitt (nick-moffitt)
Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

We rolled this out and can see `haproxy_rate{juju_env="prod-esm-content-cache"}` metrics in our internal prometheus!

Changed in content-cache-charm:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.