From a127573b14642abbbbef580271f2ae83395979ea Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Fri, 8 Dec 2023 23:22:22 +0100 Subject: [PATCH 1/2] README: use 0.22+ style matcher syntax from #1023 Signed-off-by: Christian Hoffmann --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 980f3d96..8725db4a 100644 --- a/README.md +++ b/README.md @@ -104,43 +104,43 @@ route: routes: # This routes performs a regular expression match on alert labels to # catch alerts that are related to a list of services. - - match_re: - service: ^(foo1|foo2|baz)$ + - matchers: + - service=~"^(foo1|foo2|baz)$" receiver: team-X-mails # The service has a sub-route for critical alerts, any alerts # that do not match, i.e. severity != critical, fall-back to the # parent node and are sent to 'team-X-mails' routes: - - match: - severity: critical + - matchers: + - severity="critical" receiver: team-X-pager - - match: - service: files + - matchers: + - service="files" receiver: team-Y-mails routes: - - match: - severity: critical + - matchers: + - severity="critical" receiver: team-Y-pager # This route handles all alerts coming from a database service. If there's # no team to handle it, it defaults to the DB team. - - match: - service: database + - matchers: + - service="database" receiver: team-DB-pager # Also group alerts by affected database. group_by: [alertname, cluster, database] routes: - - match: - owner: team-X + - matchers: + - owner="team-X" receiver: team-X-pager - - match: - owner: team-Y + - matchers: + - owner="team-Y" receiver: team-Y-pager From 61e7ec8833bb4d46c5d069e96183471216dcd3e7 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Fri, 8 Dec 2023 23:23:52 +0100 Subject: [PATCH 2/2] README: fix spelling in route config example comment Signed-off-by: Christian Hoffmann --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8725db4a..b2b16167 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ route: # The child route trees. routes: - # This routes performs a regular expression match on alert labels to + # This route performs a regular expression match on alert labels to # catch alerts that are related to a list of services. - matchers: - service=~"^(foo1|foo2|baz)$"