apache2 relation doesn't properly configure either apache2 or telegraf

Bug #1813288 reported by Junien F
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Telegraf Charm
Triaged
Medium
Unassigned

Bug Description

Hi,

When related to apache2, telegraf generates a vhost stanza starting with :

<VirtualHost 127.0.0.1:8080>
    ServerName 127.0.0.1
[...]

However, in the telegraf plugin config, the following is done :

addr = rel['private-address']
url = 'http://{}:{}/server-status?auto'.format(addr, port)

And 'private-address' is never 127.0.0.1.

So if you have another vhost listening on port 8080, it's possible it will get the telegraf requests for server-status, which doesn't work.

I don't see why we don't use 127.0.0.1 all the time in the telegraf apache2 plugin config, would that break some configurations ?

Thanks

Revision history for this message
Xav Paice (xavpaice) wrote :

Confirmed, in apache_input(apache) addr = rel['private-address'] (the relation private-address) and that could be switched to localhost, if we're sure that we don't want to have telegraf monitor non-local Apache instances. If we do, then we need to fix the vhost template which has 127.0.0.1 hardcoded in.

Changed in charm-telegraf:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Haw Loeung (hloeung) wrote :

Also, we'll want a 'Listen 127.0.0.1:8080' in ports.conf.

Changed in charm-telegraf:
importance: Low → 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.
(https://charmhub.io/topics/canonical-observability-stack)

Revision history for this message
Eric Chen (eric-chen) wrote :

Tag it as won't fix. But welcome to reopen it if anyone encounter this issue again.

Changed in charm-telegraf:
status: Triaged → Won't Fix
Revision history for this message
Haw Loeung (hloeung) wrote :

Yeah, it's still valid. Re-opening.

Changed in charm-telegraf:
status: Won't Fix → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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