alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

Regular Expressions from `match_re` getting anchored

Open bspradling opened this issue 9 years ago • 1 comments

I'm trying to supply a regular expression to catch all labels that contain dev to route to a development receiver and have a default production receiver. However, when I supply match_re: service: dev. In the AlertManager UI, I can see that it is actually turning that regular expression into /^(?:dev)$/.

Is it possible to have a regular expression for a tag to contain a certain value?

bspradling avatar May 08 '17 23:05 bspradling

Generally, all regular expressions in Prometheus land are anchored. This wasn't specified in Alertmanager before but it's now in line with the server's behaviour. To unanchor them, just use the regex .*dev.*.

matthiasr avatar May 09 '17 11:05 matthiasr