Using Tera templates in routing rule conditions
A routing rule condition is a Tera expression that must evaluate to true or false.
The system automatically wraps your input with {{
Common use cases
Condition for alert name starting with certain text
Condition for alert name contains certain text
Condition for alert name matching the regex
Condition for alert containing a specific label
Condition for alert containing a specific value for a label
How it’s different from other templates
- Boolean only: Regular templates render text; condition templates must yield a boolean. Any non‑boolean output is invalid.
- Do not include {{ }}, only the expression.
- If the expression fails because variable does not exist, the condition evaluates to
false.
Syntax quick start
Comparisons
==, !=, >, >=, <, <=
Logic
and, or, not
Theme
Light