-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
What did you do?
- run alertmanager with the official example config
- run amtool to add one alert
- check notifications related metrics, those start with "alertmanager_notification_"
What did you expect to see?
For not used receivers, either metrics exist for all of them or none of them.
(I'm inclined to no metrics for not used receivers.)
What did you see instead? Under which circumstances?
For most receivers, when they're not used, notifications related metrics still exist.
For example, opsgenie is not used in that config, but the time series alertmanager_notification_latency_seconds_sum{integration="opsgenie"} exists and the value is always 0.
This is not true for two new recently added receivers, webex and discord.
related code where webex and discord are missing:
Lines 283 to 300 in 01f3a47
| for _, integration := range []string{ | |
| "email", | |
| "pagerduty", | |
| "wechat", | |
| "pushover", | |
| "slack", | |
| "opsgenie", | |
| "webhook", | |
| "victorops", | |
| "sns", | |
| "telegram", | |
| } { | |
| m.numNotifications.WithLabelValues(integration) | |
| m.numTotalFailedNotifications.WithLabelValues(integration) | |
| m.numNotificationRequestsTotal.WithLabelValues(integration) | |
| m.numNotificationRequestsFailedTotal.WithLabelValues(integration) | |
| m.notificationLatencySeconds.WithLabelValues(integration) | |
| } |
I don't think this issue has real user impact because it happens on not used receivers.
Environment
-
Alertmanager version: 0.25.0
-
Alertmanager configuration file: https://github.com/prometheus/alertmanager/blob/main/doc/examples/simple.yml