Routing
Routing enables you to define routing rules that determine how notifications are directed to different connectors based on specific conditions. When a routing rule’s condition is met, the notification is sent to one or more destinations, each consisting of a connector, preset, and optional user-defined overrides. This functionality is especially useful for routing alerts based on priority levels or other alert attributes. For example, you may want to send P3 (warning) alerts to Slack and P1 (critical) alerts to PagerDuty.
Notifications pass through the routing system sequentially, evaluating each rule. If an alert matches a rule’s conditions, it is routed accordingly, and the process stops there. If no match is found, the system continues to the next rule. If no rules apply, the notification follows a fallback routing rule.
Router setup
STEP 1. Create a routing rule.
In the Routing tab, click on + Create routing rule.
STEP 2. Define the routing rule.
A popup modal will appear. In this modal, define the conditions for your routing rule. These conditions can be based on alert severity, notification source type, tags, or other alert metadata.
STEP 3. Once your routing rule is configured, click Create rule to save it.
Example use case
In this example, we define two routing rules based on alert priority:
-
P3 (Warning) Alerts → Route to Slack
-
Condition:
alertDef.priority == 'P3'
-
Destination: Slack connector with a preset configured for warning-level notifications.
-
-
P1 (Critical) Alerts → Route to PagerDuty
-
Condition:
alertDef.priority == 'P1'
-
Destination: PagerDuty connector with a preset tailored for critical-level notifications.
-
Fallback routing rule
In case none of your defined rules are met, a fallback routing rule ensures that all unhandled notifications are sent to a default destination. This guarantees that no alert is missed, even if it doesn’t match any of your specific routing conditions.
By using routing, you can fine-tune how alerts are handled based on their characteristics, ensuring that the right teams or systems are notified in the most appropriate way for each situation.