relating to haproxy doesn't work

Bug #1931150 reported by Junien F
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Telegraf Charm
Won't Fix
Medium
Unassigned

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 :

egress-subnets: 172.31.6.123/32
enabled: "True"
ingress-address: 172.31.6.123
password: REDACTED
port: "10000"
private-address: 172.31.6.123
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 172.31.6.123:10000.

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

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

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 127.0.0.1, and use that if it works.

Thanks

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

Also, the haproxy_input() function is gated with :

@when("haproxy.available")
@when("telegraf.installed")
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
Revision history for this message
Eric Chen (eric-chen) wrote :

This issue was pending long time. Is it still valid?
Furthermore, soon or later, the monitoring system will migrate to COS. Telegraf will be replaced by grafana-agent. Therefore, we won't follow up this issue. But welcome to reopen it when anyone encounter this issue again.
(https://charmhub.io/topics/canonical-observability-stack)

Changed in charm-telegraf:
status: New → Won't Fix
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.