Closed dstathis closed 2 years ago
Note: if a charm author wants to specify logic that will be evaluated over multiple units, like average CPU usage, they will use aggregator operators.
Alert rules are evaluated per timeseries. A timeseries is identified by all its labels. The unit is already in the timeseries, unless the query uses a functionality like without
.
Also, note that our end-to-end tests are likely using single units, so the failure of alerts to be raised for non-leader units went unnoticed.
A fix has been merged into the git repository and is currently under testing.
@dstathis can this ticket be closed ?
Bug Description
When using the prometheus_scrape library, the unit should not be added as a label. There should only be one set of alerts which act on the whole application.
To Reproduce
Use version 0.16 of the prometheus_scrape library and make sure to include alert rules.
Environment
juju+k8s
Relevant log output
Additional context
No response