Designing Alertmanager routing trees for multiple teams

A practical guide to structuring Alertmanager routes so each team receives its own alerts, with label conventions, group_by choices, continue and matchers, default receivers and route testing before rollout.

On this page

Designing Alertmanager routing trees for multiple teams: when a single route stops working

A routing tree is the set of routes in Alertmanager's configuration that decides which receiver gets each alert. You need one when several teams share a single Prometheus and Alertmanager and a flat configuration can no longer send each alert to the people who own it. Alertmanager itself handles grouping, inhibition and silences, but it does not know who owns a service. The routing tree supplies that knowledge by matching alert labels, such as team or service, to receivers. When a single route with one default receiver is in place, every page goes to the same inbox, and the usual symptom is an on-call engineer waking up for a database that belongs to another group.

Start by agreeing on the label conventions before writing any route. Every alert rule should carry an owner label, and the team should check that label on each rule in version control, because a missing or misspelled value silently falls through to the default receiver. Choose group_by labels that match how responders work, usually the owner and the alert name, so one team's incident arrives as one notification. Use continue: true only where an alert must reach a second receiver, such as a team channel and an audit log, and document each place it is used. Confirm the matcher syntax and route behavior against the Alertmanager documentation for your installed version, since those details change between releases.

Keep a catch-all receiver that pages a platform owner, and treat any alert that reaches it as a defect in the routing or labeling. Before rollout, test the tree with amtool config routes test and amtool config routes show against sample label sets for each team, and include those checks in CI so a change to a route is reviewed like any other code change. Plan for the cost of this work: the software is Apache-2.0 licensed, so the expense is the time of the engineers who write and maintain the configuration and the infrastructure that runs Prometheus and Alertmanager. Ask any partner quoting this work to show the test cases they will deliver with the routing configuration.

Routing options and when each fits

This table compares the routing choices that shape which team receives which alert in an Alertmanager tree. Read each row for the situation where the option fits and the failure it most often causes. The main takeaway is that broad grouping and continue settings are the two places where a routing tree most often hides incidents or duplicates pages.

Routing choiceWhen it fitsMain risk
Label matchers (exact match)Each team owns a stable label such as team or service, and alerts carry that label from the rule or the sourceAlerts without the label fall through to the default route, so unlabeled rules go to the wrong team
Regex matchersSeveral services or namespaces share one owning team and a single naming pattern covers themA loose pattern can match unrelated services, and regex routes are harder to review and test
group_by on alertname and teamTeams want one notification per alert type within their own scope, with a stable grouping keyAlerts from different services or clusters merge into one message, so separate incidents look like one
group_by on cluster and namespaceA failure is scoped to a cluster or namespace and the owning team works there as a unitDistinct alert types in the same namespace are bundled, which can bury a second problem under the first
continue set to falseAn alert should reach exactly one team and the first matching route is the ownerRoute order becomes critical, and a later, more specific route for another team never sees the alert
continue set to trueA platform or audit receiver must see alerts that also go to an owning teamBoth receivers page, so the same incident can notify two teams and create duplicate tickets
Catch-all default receiverUnowned alerts need a visible home, such as a triage channel that someone reviewsIf the default is a paging receiver, every missed label becomes a page for the wrong people
Separate routes for severityCritical alerts page on-call while warnings go to a chat channel or ticket queue for the same teamSeverity labels set inconsistently across rules send real pages to low-priority receivers

How to roll out a team routing tree safely

This sequence turns a routing design into a tested, staged change, so each team's alerts reach the right receiver before the whole organization depends on the new tree. Each step ends with a check that shows whether the change is ready to move forward.

  1. Agree the label contract across teams

    Platform engineering and representatives from each owning team agree on the labels every alert must carry: team, service, severity and environment. Write the allowed values for each label, who may add a new value, and what happens to alerts that arrive without a label. The output is a short, versioned document that every rule author can reference. You know this step is done when each team has signed off on the values for its own services and the default for unlabeled alerts is written down.

  2. Attach the labels in rules and relabeling

    Platform engineers add the agreed labels to alerting rules with the labels block, and use relabeling in scrape configs for labels that should come from target metadata, such as the owning team recorded on a job. Keep label values lowercase and consistent with the contract so matchers stay predictable. Check the result by querying the rules API or the Prometheus UI and confirming that a sample of firing and pending alerts shows every required label with an expected value.

  3. Write the routing tree with a default receiver

    The platform team writes the route tree in alertmanager.yml, starting with a top-level default receiver that catches anything no team route matches. Team routes use matchers on the team and severity labels, group_by choices that match how each team responds to incidents, and continue only where a copy must reach a second receiver. Keep receivers in a separate, reviewed file where possible. The check is that the default receiver is reachable and that every team route names a receiver defined in the same file.

  4. Validate the configuration with amtool

    Run amtool check-config against the full Alertmanager configuration, including any included template and receiver files. The command reports syntax errors, undefined receivers and invalid matchers before the file reaches a running instance. Store this check in CI so no change merges without passing it. Done means the command exits cleanly on the committed configuration, and the same result is produced by the CI job for every proposed change.

  5. Test routes with sample labels

    Use amtool config routes test with sample label sets that represent each team, each severity and the unlabeled case, and confirm which receiver each set resolves to. Include alerts that should match two routes when continue is used, and alerts that should fall through to the default. Store the expected receiver for each sample next to the configuration so the test can run again on every change. The check is a table where every sample resolves to the receiver the contract says it should, with no surprises on the default receiver.

  6. Send a test alert end to end

    Send a synthetic alert through Alertmanager's API with the same labels a real rule would produce, then confirm it reaches the destination for the owning team and nowhere else. This tests the full path: Prometheus rule evaluation or a direct API post, routing, grouping, template rendering and delivery. Use a test receiver or a channel reserved for drills, and send a matching resolved alert afterward. Done means the team confirms receipt, and the resolved notification arrives on the same channel.

  7. Roll out to one team before the rest

    Move the new tree into production with only one team's route active and the others still on the previous configuration or the default receiver. Watch the Alertmanager status and notification logs during a normal working period, and ask that team to report any missing, duplicated or misrouted alerts. Expand to the next team only after that team confirms its alerts arrive as expected. The check is a signed-off first team, a clean log for its receiver, and a documented rollback step that restores the previous file.

How an alert flows through the routing tree

Prometheus evaluates its rules and sends firing alerts to Alertmanager, which compares each alert's labels against the matchers on the root route. Matching alerts drop into a child route for the owning team, and a route marked to continue also copies the alert onward to a second route. Alerts that match no child fall to the default receiver, so check that nothing lands there silently. Test each path with sample labels before the tree goes live.

Illustrative routing flow from Prometheus through team routes to receivers.

Label conventions that make routing predictable

Alertmanager routes match on labels, so every team's alerts are only as well routed as the labels they carry. The cards below cover the labels a multi-team estate needs, who should own each value set, and what breaks when teams pick their own spellings. Agree these conventions before writing the first matcher, because a single misspelled value can send a page to the wrong place without any error.

Owning team label

The owning team label, commonly named team, tells Alertmanager whose pager or channel an alert belongs to. Publish one canonical list of team values that matches your identity provider or service catalog, and have the platform team own that list. When teams invent values such as payments, Payments or pay-team, matchers silently miss, and the alert falls through to the default receiver. Check that every rule file carries the label, either set in the rule or added at scrape time.

Service label

A service label names the component that is failing, such as checkout-api or ledger-worker. It lets a route or inhibition rule target one system without relying on the team, which may own several services. Agree a naming rule, for example lowercase with hyphens and matching the deployment name, and assign the catalog owner of each service as the authority. Free-form service names break grouping, because alerts for one component can land in separate notification groups.

Environment label

The env label separates production alerts from staging and test alerts so that a noisy test cluster never pages the on-call rota. Use a short fixed set such as prod, staging and dev, and set it in the external labels of each Prometheus server so every alert inherits it. Confirm that no team sets it per rule, since a mistyped value can route production pages to a non-paging receiver.

Severity label

A severity label decides how an alert is delivered, for example a page for critical and a ticket or chat message for warning. Define the allowed values in writing and tie each one to a response expectation agreed with the on-call team. Teams that invent levels such as high or P1 leave alerts with no matching route. Review the list when you add a receiver, because each severity should map to a receiver you have tested.

Rule source labels

Rule-level labels such as alertname and any rule_group or runbook annotation identify where an alert came from and how to act on it. Alertmanager groups on these, so a stable alertname vocabulary prevents duplicate notifications for the same condition. Ask each rule author to keep names unique and descriptive, and to attach a runbook link as an annotation. Changing an alert name later creates a new alert identity, so treat renames as a planned change.

Alertmanager docs

Questions teams ask before designing routes

How long does designing and testing an Alertmanager routing tree take?

The duration depends on how many teams, services and receivers the tree must cover, and on how consistent the existing labels are. A small tree with two or three teams and one notification channel is mostly a review of labels and a set of test alerts. A tree that spans many teams, several receivers such as Slack, Microsoft Teams, PagerDuty and ticketing, and maintenance windows takes longer, because each route needs an owner, a receiver and a test case. The main drivers are label quality, the number of receivers that need accounts or credentials, and how many people must approve the ownership map. No figure is given here because it depends on those inputs. Ask any partner for a written breakdown by phase: label audit, route design, receiver setup, test harness and rollout. Each phase should name its inputs and what the client must provide.

Can our in-house team design Alertmanager routes without outside help?

Yes, a team that already runs Prometheus and Alertmanager can design its own routing tree, and Alertmanager's configuration is plain YAML that can be reviewed in version control. The work that tends to stall internal projects is not the syntax but the agreement on ownership: who owns each service, which team is paged for which severity, and which alerts should never page anyone. An outside partner is most useful when the team lacks time to run the design workshops, cannot reach the owners of the services, or needs an independent review before production. Ask whether the project includes a written ownership map, a test set and a rollback plan, so the in-house team can keep the tree working after the engagement ends.

What does the work need from our team before routes can be designed?

Three inputs decide most of the design. The first is label ownership: each alert should carry labels such as team, service and severity that map to a named owner, and someone must confirm which label is authoritative. The second is receiver accounts: Slack, Microsoft Teams, PagerDuty, incident.io, Jira, email relays or webhook endpoints each need a configured destination, a credential and an owner who can rotate it. The third is on-call data: the schedule, escalation policy and business hours for each team, plus any maintenance windows. Without these, routes will be guesses. Ask the client team for a list of existing alert rules with their labels, and a named contact for each receiver.

How should routes handle services that more than one team shares?

Shared services need an explicit rule rather than an implicit one, because a route sends each alert to the first matching branch unless continue is set. One common pattern is to assign a primary owner label, route the alert there, and use continue: true on a child route to copy the alert to a second team that needs visibility without paging it. Another is to create a platform receiver that owns shared components such as the database cluster or the ingress layer. Decide which team is paged, which teams receive informational copies, and whether a shared alert is ever sent to more than one on-call rotation. Test each case with sample alerts before rollout, because duplicate pages are one of the most common complaints after a routing change.

What should a quote for Alertmanager routing design include?

A quote should follow from a written scope, and it should list the deliverables rather than only hours. Ask for the label and ownership audit, the routing tree design with a diagram, the list of receivers and the configuration needed for each, the group_by and grouping decisions with reasons, a default receiver for unrouted alerts, the test set that exercises each route, the rollout and rollback plan, and the handover notes for the team that will maintain the configuration. Ask which items are one-time and which recur, such as periodic route reviews, receiver credential rotation or retainer support. Also ask what the client must provide and what happens if the inputs arrive late. DeployOpen does not publish a price list, and a quote follows from the agreed scope.

How do we change routes without losing pages during rollout?

Change routes in stages, not in one switch. Keep the existing configuration running, add the new tree beside it or behind a review, and send synthetic alerts through both paths to compare which receivers fire. Validate the configuration syntax before loading it, and keep a default receiver so unmatched alerts still reach a human. Confirm that every team's on-call tool receives a test notification, and check resolved messages as well as firing messages. Roll back by reverting the version-controlled file and reloading Alertmanager. For a clustered deployment, confirm that Prometheus sends alerts to every Alertmanager instance before and after the change, as described in the Alertmanager documentation.

Which parts of a routing tree need ongoing maintenance after launch?

Routing trees change as teams, services and on-call rotations change, so they need a scheduled review. The recurring work includes updating ownership labels when a service moves, rotating receiver credentials, reviewing silences and time intervals for maintenance, and checking that new alert rules carry the labels the tree depends on. A simple control is a test that fails the build when an alert rule lacks a required label, which can be combined with unit tests for alert rules. Ask any partner whether ongoing support is offered as a retainer and what it covers, including after-hours response if that matters to your teams.

Security and operational risks in shared routing

A shared routing tree sends every team's pages through one Alertmanager, so its configuration, its access controls and its delivery path become shared risks. The cards below cover the places where a routing mistake or an exposed endpoint can silence a team, leak a receiver credential, or stop pages from leaving the cluster.

Receiver credentials in configuration

Each receiver often holds an API key, webhook URL, SMTP password or routing key, and these usually sit in the same alertmanager.yml file that every team edits. Anyone who can read or change that file can redirect pages or copy credentials. Check where the file lives, who can read it in version control, and whether secrets are injected from a secret store at deploy time. Confirm the same rule applies to rendered templates and backups.

Who can silence alerts

A silence hides matching alerts from every receiver, so a broad matcher written in a hurry can hide a production outage from the team that owns it. Decide which roles may create silences, set a maximum duration and require an owner and a reason on each one. Confirm whether your Alertmanager version and access layer record who created each silence, because the routing tree itself does not show that history.

Admin and reload endpoints

The Prometheus admin APIs are disabled by default, and the lifecycle endpoints that reload configuration are a separate switch. In Prometheus, --web.enable-admin-api enables destructive operations and --web.enable-lifecycle enables reload and shutdown. Routing changes that depend on a reload need a controlled path, so confirm which flags your deployment sets, which identities can call the endpoints, and whether a bad configuration is rejected before it takes effect.

Prometheus security model

Exposure without TLS or authentication

Alertmanager's web UI and API show alert contents, labels and silences, and they accept silence changes. Prometheus supports TLS with a minimum of TLS 1.2, client certificates and HTTP basic authentication with bcrypt-hashed passwords, but basic authentication sent without TLS exposes the password in cleartext. Put every Alertmanager endpoint behind TLS, restrict network paths to Prometheus and operators, and test that an unauthenticated request is refused.

Dependency on clustered delivery

If one Alertmanager instance holds the only route to a receiver, a failure there can stop every team's pages, even when the routing tree is correct. Alertmanager can run as a cluster for high availability, and Prometheus should be configured to send to every instance rather than through a load balancer. Confirm the cluster flags, test that a single-instance failure still delivers a test page to each team, and alert on cluster membership so a silent degradation is noticed.

Alertmanager docs

What a well-designed tree changes for on-call teams

A well-designed routing tree changes three things for on-call engineers: fewer pages land on the wrong team, ownership is clear when a service spans several teams, and nothing is silently dropped because the tree has a default path that catches what the specific routes miss. The default receiver at the root of the tree is the safety net. Without it, an alert whose labels match no route can fall through without anyone being notified, which is the failure that hurts most during an incident. Ask each team to confirm which receiver owns unmatched alerts, and who watches that receiver, before the tree goes live.

Misrouted pages are usually a labeling problem before they are a routing problem. When a service carries a team label that does not match the team name in the receiver, or when a shared dependency emits alerts without an owner label, the matcher in the route block does its job and sends the alert to the wrong place. Clear label conventions, plus explicit handling for alerts that cross team boundaries through continue and a shared receiver, make ownership visible in the configuration rather than in someone's memory. Review these choices with the teams that will be paged, because they know which dependencies they actually own.

A routing tree is a living contract between teams, and it needs a named owner who approves changes, retires stale receivers and reviews the default path after incidents. Store the alertmanager.yml file and its routing tests in version control, and run those tests in CI alongside the promtool rule tests, so a change to a matcher fails a build instead of reaching on-call rotations. Confirm with your Alertmanager version that the tooling you plan to use for route testing is supported, and record who may approve a change to the tree.

How DeployOpen designs and delivers Alertmanager routing

DeployOpen treats the Alertmanager routing tree as a written design before it touches configuration. We agree which teams own which alerts, how labels identify them, and how unrouted alerts are caught, then build and test the tree against those rules before rollout. Engagements are fixed-scope, with the deliverables agreed in writing first.

How we scope

  • Inventory the teams, services and alert sources that need their own routes, and who is on call for each.
  • Agree the label conventions that routing depends on, such as team, service and severity, and who owns changes to them.
  • Write down the default receiver for unmatched alerts and the escalation path if an alert reaches it.

How we build

  • Write the route tree with matchers, group_by choices and continue settings, then check each team's alerts reach only their receivers.
  • Set receiver definitions for each channel in use, with credentials stored outside plain configuration files.
  • Test routes with amtool and sample alerts across every branch, including the default route, before anything reaches production.

How we hand over

  • Deliver the routing configuration in version control with a readme that explains each label convention and route.
  • Document the test cases and the commands the team runs to re-check routes after every change.
  • Walk through the rollout runbook, including how to add a team, change a receiver and confirm a route with an alert test.

How we support

  • Review routing changes from new services or teams against the agreed label conventions and default receiver rules.
  • Retest routes after Alertmanager upgrades, since the configuration and receiver behavior may change between releases.
  • Offer ongoing support, upgrades and continuous testing as a retainer, with scope agreed in writing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.