Use it to deliver alerts to the right people without spam.
Alertmanager Routing and Grouping
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.
1. Config check: amtool check-config alertmanager.yml.
2. Route test: amtool config routes test --config.file=alertmanager.yml severity=critical team=net.
3. Active alerts: amtool alert query.
4. Receivers reachable.
5. Inhibition rules.
alert → dedup → route tree → group → receiver
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 How to verify Verify boundary
Test routing with amtool for each team's labels. Send a test alert and confirm delivery.
Step 2 Common failures Narrow the fault
Grouping by too few labels merges unrelated alerts. A catch-all route placed first takes every alert. An expired webhook token makes all notifications fail.
Group by alertname and service/cluster. Inhibit symptom alerts when a root-cause alert fires. Test routing with amtool.
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
ReferenceWhat it is1 section · depth on demand
How it works
Prometheus sends firing alerts to Alertmanager repeatedly. Alertmanager waits group_wait before the first notification, then group_interval for updates and repeat_interval for reminders.
ReferenceImportant terms & boundaries3 sections · depth on demand
Routing example
route:
receiver: default
group_by: [alertname, cluster, service]
group_wait: 30s
group_interval: 5m
repeat_interval: 4h
routes:
- matchers: [severity="critical"]
receiver: pagerduty
- matchers: [team="network"]
receiver: network-slack
inhibit_rules:
- source_matchers: [alertname="NodeDown"]
target_matchers: [severity="warning"]
equal: [instance]
Documented example, not captured output. Test routing with amtool config routes test severity=critical.
In depth
Timing parameters
| Parameter | Meaning | Typical |
|---|---|---|
group_wait | Wait before the first notification for a new group, to collect related alerts | 30 s |
group_interval | Wait before notifying about new alerts added to an existing group | 5 m |
repeat_interval | Re-send an unchanged, still-firing group | 4 h (pages), 12–24 h (tickets) |
Routing tree
route:
receiver: default
group_by: [alertname, cluster, service]
routes:
- matchers: [severity="page"]
receiver: oncall-pagerduty
routes:
- { matchers: [team="db"], receiver: db-oncall }
- matchers: [severity="ticket"]
receiver: jira
continue: false
inhibit_rules:
- source_matchers: [alertname="NodeDown"]
target_matchers: [severity=~"page|ticket"]
equal: [instance]
The first matching route at each level wins (continue: true lets matching continue to siblings). The inhibit rule suppresses all other alerts from an instance while NodeDown fires for it, so one dead node does not page ten times.
Testing routes before an incident
amtool config routes test --config.file=alertmanager.yml severity=page team=db alertname=PostgresDown
# db-oncall
amtool config routes show --config.file=alertmanager.yml
amtool check-config alertmanager.yml
High availability
Run two or three Alertmanager instances in a cluster (gossip on port 9094) and point every Prometheus at all of them; the cluster deduplicates notifications. Putting a load balancer in front so each Prometheus talks to only one instance defeats the deduplication of silences and notifications.
Common mistakes
- Grouping too broadly and hiding separate incidents.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.