alertmanager
alertmanager copied to clipboard
Regular Expressions from `match_re` getting anchored
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?
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.*.