See the template functions listed here: https://prometheus.io/docs/prometheus/latest/configuration/template_reference/#strings
There is one called "match" which matches regular expressions. (Note that there is not one called "regexMatch") You should also be able to use the go template global functions: https://pkg.go.dev/text/template#hdr-Functions If this is for alerts, it might be simpler to use routing rules, with two different alert receivers. On Friday 28 June 2024 at 10:49:00 UTC+1 [email protected] wrote: > Hi, > > is it possible to make a regexp match in annotation? > > I need to check, if label contains specific string. > > function "regexMatch" not definedThank you. > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/1c9af9c0-32f0-4f13-bb72-a8f8a3f76a7dn%40googlegroups.com.

