Add a relation for input prometheus plugin

Bug #1849083 reported by Benjamin Allot
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Telegraf Charm
Won't Fix
Wishlist
Unassigned

Bug Description

Goal:
Telegraf has the ability to scrape prometheus metrics so it can expose them: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/prometheus

This would allow a better homogeneous experience with metrics and labels, as telegraf would be the only point of scraping on a said node in the events that several process would expose metrics on a server.

Examples:
An example use case. If you need to scrape a list of prometheus urls you would create a file /etc/telegraf/telegraf.d/inputs_prometheus.conf like this:
```
[[inputs.prometheus]]
  urls = ["http://localhost:9145/metrics"]
```

However, one could be also interestd if scraping such metrics succeeded or failed.
Another file /etc/telegraf/telegraf.d/inputs_internal.conf could look like this:

```
[[inputs.internal]]
```
This would expose internal telegraf metrics such as the "internal_gather_errors" that, with the right label could be used to alert on scraping error.
i.e:
internal_gather_errors{alias="",host="prod:unit-0",input="prometheus",version="1.12.3"} 0

I therefore propose to add an interface layer to allow charm to publish input prometheus urls to the telegraf charm.
I would prefer to tie the internal to this one but this could also be separated.

Jose Guedez (jfguedez)
Changed in charm-telegraf:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Eric Chen (eric-chen) wrote :

Soon or later, the monitoring system will migrate to COS. Telegraf will be replaced by grafana-agent.
(https://charmhub.io/topics/canonical-observability-stack)
This feature won't be implemented.

Changed in charm-telegraf:
status: Triaged → 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.