Add Routing Labels to Alerts
Routers use routing labels to determine which alerts should be processed through them. By configuring routing labels on an alert, Notification Center automatically applies the routing logic based on these labels.
What routing labels do
Routing labels are key–value pairs that connect alerts to routers.
When a notification request includes routing labels that match those defined on a router:
- The router’s rules are evaluated and applied.
- If routing labels are missing or do not match, the router does not process the alert.
Matching examples
| Router Labels | Alert Routing Labels | Result |
|---|---|---|
team:teamA, environment:prod | team:teamA, environment:prod | ✅ Matched |
team:teamA, environment:dev | team:teamA, environment:prod | ❌ Not matched |
environment:prod | team:teamA, environment:prod, service:app1 | ✅ Matched |
team:teamA, environment:prod | team:teamA, environment:prod, service:app1 | ✅ Matched |
team:teamA, environment:dev, service:app1 | team:teamA, environment:prod, service:app1 | ❌ Not matched |
Label format
Routing labels are added to alerts with a routing prefix:
| Example Key | Example Value | Purpose |
|---|---|---|
routing.team | security | Routes alerts for the security team. |
routing.environment | prod | Routes alerts for production. |
routing.service | checkout | Routes alerts for a specific service. |
Add labels to an alert
- Navigate to Alerts, then select Create Alert or edit an existing alert.
- In the Notifications section under Notification Center, add one or more routing labels.
- The Matching routers list updates automatically to show routers matched by the labels you add.
- Save the alert.
- When triggered, the alert automatically routes through all routers matching its routing labels.
Note
Ensure label values have no leading or trailing spaces, as this may cause mismatches.
Label requirements
- Labels are case-sensitive.
- Duplicate keys are not allowed.
- Use consistent label names across alerts to prevent routing mismatches.
Next steps
- Routers: Create routers that match your routing labels (team, environment, service)
- Routing Rules: Add conditions that send matching alerts to the right destinations
Theme
Light
