I would like to use the conditional operator into the Prometheus alert.rules definition to set a specific severity. For instance, if the environment is production, I want to set the severity to critical else another value.
Something like:
- alert: CPU load
expr: expression_used_to_check_load
for: 15m
labels:
severity: if $labels.env == prd -> severity = critical else something else
annotations:
summary: Just a summary
description: "Just a description"