In the docs, it says that we can add a set of match clauses under match:
. It says literally:
A set of equality matchers an alert has to fulfill to match the node.
match:
[ <labelname>: <labelvalue>, ... ]
But it doesn't tell us how to actually provide there multiple matchers. Neither does it tell us if these matchers and ANDed or ORd.
So my two questions are:
- How does one properly provide multiple match clauses for a receiver?
I would expect following to work:
match:
label1: value1
lavel2: value2
- Will these match clauses be ANDed or ORd?
All clauses have to match, i.e. the clauses are ANDed.
Just confirming that you can add multiple match clauses, which are ANDed. Means all clauses have to match.
Like for example:
routes:
- matchers:
- name: severity
value: warning
- name: foo
value: bar
receiver: slack
repeatInterval: 24h
- matchers:
- name: severity
value: warning
receiver: msteams
repeatInterval: 24h
In the example above, both clauses watch on the same severity but the alert message will only be send to the slack receiver, when also the label foo=bar
matches. Otherwise the alert will only be send to the msteams receiver.
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