Open btwseeu78 opened 1 year ago
If I understand correctly, you want this which ensures that the alert has a host label though it doesn't match the regexp.
...
- receiver: "msteams-prj-cert_channel"
matchers:
- host !~ "^[A-Za-z0-9]+.ope-test-fr$"
- host != ""
alertmanagerconfig:
for receiver : msteams-prj-cert_channel , if host is : 'test..ope-test-fr' it should not be matched and should move to default channel. but if in some alert the label host is not present ,it also matching this regex: msteams-prj-cert_channel, logically that's true but we need something to make sure this does not happen as there should be many specified labels that is not present in some alerts. we can not use !~ as it considers blank labels also as same.
alertmanager app version: v0.24.0 routes are tested in : https://prometheus.io/webtools/alerting/routing-tree-editor testcase : {host="^[A-Za-z0-9]+.ope-test-fr"} works correctly. testcase: {namespace="monitoring" } routes it to msteams-prj-cert_channel