Pcornel
Browse topics
Options
Recent
Favorites
Observability · Technical reference

Alertmanager Routing and Grouping

Direct 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.

When to use this

Use it to deliver alerts to the right people without spam.

First 30 seconds

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.

Operational verification

alert → dedup → route tree → group → receiver

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
OpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformOpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
Scope / prerequisiteUse it to deliver alerts to the right people without spam.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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.

Key points

Group by alertname and service/cluster. Inhibit symptom alerts when a root-cause alert fires. Test routing with amtool.

Key checks
  • amtool check-config alertmanager.yml — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool 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

ParameterMeaningTypical
group_waitWait before the first notification for a new group, to collect related alerts30 s
group_intervalWait before notifying about new alerts added to an existing group5 m
repeat_intervalRe-send an unchanged, still-firing group4 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Terminology layer

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.

Aliases that resolve here
alertmanager routing and groupingalertmanager routingamtool config routes
Confirmation

Confirm action

Continue?