relating to haproxy doesn't work

Bug #1931150 reported by Junien Fridrick
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Telegraf Charm

Bug Description

This is somewhat related to bug 1910974, which is actually still not fixed from what I can see.

On an AWS model, the relation data returned by haproxy will look like :

enabled: "True"
password: REDACTED
port: "10000"
user: haproxy

And the current telegraf code does :

addr = rel.get("listener-address", rel["private-address"])

So the telegraf charm will be configured to check the haproxy statistics via

But, by default, haproxy only allows to query the statistics. And so connections to fail.

As @hloeung said in bug 1910974, this is a subordinate charm, so why use anything else than ?

At the very least, the telegraf charm should try actually fetching metrics, and if it doesn't work with the relation data then it should try with, and use that if it works.


Revision history for this message
Junien Fridrick (axino) wrote :

Also, the haproxy_input() function is gated with :

def haproxy_input(haproxy):

So it will be called for every single hook if haproxy is related. We should gate it with a flag that's set at the end of this function ("haproxy.input.configured" or something) and unset this flag where appropriate ("config-changed" etc...)

Edin S (exsdev)
Changed in charm-telegraf:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers