Observability · Alerting
Alertmanager Routing and Grouping
Cheat sheet · https://pcornel.dk/topic.php?topic=6223
Answer
Alertmanager receives alerts from Prometheus and deduplicates, groups (group_by, group_wait, group_interval, repeat_interval), routes to receivers by labels, and applies silences and inhibitions.
Remember
Group by alertname and service/cluster. Inhibit symptom alerts when a root-cause alert fires. Test routing with amtool.
First checks
amtool check-config alertmanager.yml— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
Verify in this order
alert → dedup → route tree → group → receiver
Where it usually breaks
Grouping by too few labels merges unrelated alerts.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6223