Open
Description
What did you do?
I ran into an edge case when monitoring an alertmanager. I want to see what proportion of my actual notifications are covered by silences. AFAIK, we need to introduce a new metric to solve this. If there's some PromQL magic that I missed that can be used to derive this value, please let me know.
We should expose a new counter, something like alertmanager_notifications_silenced
, that counts for notifications that were not sent due to the presence of a silence.
We have a few similar metrics that don't exactly solve this.
alertmanager_silences_active
- This is a gauge that tracks the current number of active alerts covered by silences. This is subtly different, as:- Multiple notifications might be sent for a single alert (repeat_interval)
- Silences might be created or expired between scrapes. If you carefully create and expire two different silences between the same scrape, you end up with more silenced notifications but no visible change in the value of this gauge. So, it doesn't capture all the information necessary.
alertmanager_notifications_total
byintegration
- Doesn't seem to care about silences, and only tracks notifications by receiver.
What did you expect to see?
I wanted to count the number of actual notifications that were silenced over time, from the emitted metrics.
Environment
- System information:
n/a
- Alertmanager version:
main
- Prometheus version:
n/a
- Alertmanager configuration file:
n/a - any
- Prometheus configuration file:
n/a - any
- Logs:
n/a