I'm trying to define an alert rule with "expr" containing regular-expression
Metric: XYZ-POST-failure-400-1min-rate
- alert: alert_name_here
expr: __name__=~"(.*)-POST-failure-\d{3}-1min-rate" > 0
Unit testing this using "promtool"
Error
group "group_name", rule 1, "alert_name_here": could not parse expression: parse error at char 10: unexpected character after '=': '~'
Is this even supported by Prometheus alert manager? Can someone guide me on what is the correct way to achieve this?
Thank you