canonical / grafana-agent-operator

https://charmhub.io/grafana-agent
Apache License 2.0
4 stars 10 forks source link

Metrics and rules labeled from originating charm. #47

Closed dstathis closed 8 months ago

dstathis commented 8 months ago

Fixes #17

Issue

Previously we had all metrics and alert rules labeled with the topology of the principal charm. This caused issues as it was difficult, from charm code, to figure out which charm was principal. This also would have posed problems for multi-principal machines.

Solution

All alert rules and metrics now get topology labels from the charm from which they originated.

Testing Instructions

  1. Deploy kafka, zookeeper, hardware-observer, and grafana-agent
  2. Relate them to COS
  3. Check that logs, metrics, and alerts all have proper labels.

Release Notes

Simplified the labeling model of metrics and alert rules