match:
[ <labelname>: <labelvalue>, ... ]
# A set of regex-matchers an alert has to fulfill to match the node.
match_re:
[ <labelname>: <regex>, ... ]
My question is what is the difference between a match and a match_re statement? I have used both of the within prometheus and the effect they have is the same.
Any help is very much appreciated!!
With "match_re" you can use regular expression like in the following examples:
service: "mysql|postgre"
system: ".*_(foo|boo)$"
recipient: "(.*,)?customer/sms(,.*)?"
alertname: "watchdog.*alert"
From the v0.22.2 both match and match_re are deprecated in favor of matchers. A nice new feature is the possibility to define negative matchers.
# DEPRECATED: Use matchers below.
# A set of equality matchers an alert has to fulfill to match the node.
match:
[ <labelname>: <labelvalue>, ... ]
# DEPRECATED: Use matchers below.
# A set of regex-matchers an alert has to fulfill to match the node.
match_re:
[ <labelname>: <regex>, ... ]
# A list of matchers that an alert has to fulfill to match the node.
matchers:
[ - <matcher> ... ]
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With