Alertmanager
Alertmanager handles alerts generated by Prometheus. It manages the routing, grouping, and notification of alerts to various integrations such as email and webhooks.
Last updated
Alertmanager handles alerts generated by Prometheus. It manages the routing, grouping, and notification of alerts to various integrations such as email and webhooks.
Last updated
Alertmanager is responsible for handling alerts sent by client applications such as Prometheus and then managing those alerts by grouping, deduplicating, routing, and sending them to various receiver integrations like email, webhook, PagerTree, etc.
Key features of Alertmanager include:
Grouping: Similar alerts can be grouped together to avoid overwhelming the users with redundant notifications.
Inhibition: Prevents certain alerts from firing if another specific alert is already open. This helps prevent flooding with redundant notifications.
Silencing: Administrators can silence certain alerts during maintenance or in response to known issues, preventing unnecessary notifications.
Routing: Alerts can be routed to different destinations based on certain criteria, such as severity level, alert type, or specific attributes.
Integration: Supports integration with various notification systems and channels like email, webhook, PagerTree, etc.
Grouping categorizes alerts with a similar label set into a single notification. The group is configured by a routing tree in the configuration file.
Example: Your database goes down, and all services can no longer reach it. Prometheus' alerting rules were configured to send an alert for each service that cannot communicate with the database. As a result, many alerts were sent to Alertmanager. Alertmanager groups these alerts into one and sends a single alert/notification.
Inhibition suppresses notifications for certain alerts if certain other alerts are already firing. Inhibitions are configured through the Alertmanager configuration file.
Example: An alert is firing about an entire cluster that is not reachable. Alertmanager is configured to inhibit all other alerts concerning the cluster if this alert condition is already firing. This prevents duplicate alerts/notifications from being sent that might be downstream from the actual issue.
Silences are a way to mute alerts for a given time. Silences are configured in the web interface of Alertmanager.
Example: Incoming alerts are checked to see whether they match all the equality or regular expression matches of active silence. If they do, no notifications will be sent out for that alert.
Alertmanager is configured via command-line flags and a configuration file (YAML format). The full YAML scheme can be found in the official docs, and the visual editor can be used to help build route trees.
The following is an example configuration file:
Notifications sent to receivers are constructed via templates. Alertmanager comes with default templates, but they can also be customized.
By default, Alertmanager starts in high availability mode. To configure the Alertmanager cluster, use the cluster-* flags.
Do not load balance traffic between Prometheus and Alertmanager. Instead, point Prometheus to a list of all Alertmanagers.