README: use 0.22+ style matcher syntax from #1023
Signed-off-by: Christian Hoffmann <mail@hoffmann-christian.info>
This commit is contained in:
parent
4a0bf2aa74
commit
a127573b14
28
README.md
28
README.md
|
@ -104,43 +104,43 @@ route:
|
||||||
routes:
|
routes:
|
||||||
# This routes performs a regular expression match on alert labels to
|
# This routes performs a regular expression match on alert labels to
|
||||||
# catch alerts that are related to a list of services.
|
# catch alerts that are related to a list of services.
|
||||||
- match_re:
|
- matchers:
|
||||||
service: ^(foo1|foo2|baz)$
|
- service=~"^(foo1|foo2|baz)$"
|
||||||
receiver: team-X-mails
|
receiver: team-X-mails
|
||||||
|
|
||||||
# The service has a sub-route for critical alerts, any alerts
|
# The service has a sub-route for critical alerts, any alerts
|
||||||
# that do not match, i.e. severity != critical, fall-back to the
|
# that do not match, i.e. severity != critical, fall-back to the
|
||||||
# parent node and are sent to 'team-X-mails'
|
# parent node and are sent to 'team-X-mails'
|
||||||
routes:
|
routes:
|
||||||
- match:
|
- matchers:
|
||||||
severity: critical
|
- severity="critical"
|
||||||
receiver: team-X-pager
|
receiver: team-X-pager
|
||||||
|
|
||||||
- match:
|
- matchers:
|
||||||
service: files
|
- service="files"
|
||||||
receiver: team-Y-mails
|
receiver: team-Y-mails
|
||||||
|
|
||||||
routes:
|
routes:
|
||||||
- match:
|
- matchers:
|
||||||
severity: critical
|
- severity="critical"
|
||||||
receiver: team-Y-pager
|
receiver: team-Y-pager
|
||||||
|
|
||||||
# This route handles all alerts coming from a database service. If there's
|
# This route handles all alerts coming from a database service. If there's
|
||||||
# no team to handle it, it defaults to the DB team.
|
# no team to handle it, it defaults to the DB team.
|
||||||
- match:
|
- matchers:
|
||||||
service: database
|
- service="database"
|
||||||
|
|
||||||
receiver: team-DB-pager
|
receiver: team-DB-pager
|
||||||
# Also group alerts by affected database.
|
# Also group alerts by affected database.
|
||||||
group_by: [alertname, cluster, database]
|
group_by: [alertname, cluster, database]
|
||||||
|
|
||||||
routes:
|
routes:
|
||||||
- match:
|
- matchers:
|
||||||
owner: team-X
|
- owner="team-X"
|
||||||
receiver: team-X-pager
|
receiver: team-X-pager
|
||||||
|
|
||||||
- match:
|
- matchers:
|
||||||
owner: team-Y
|
- owner="team-Y"
|
||||||
receiver: team-Y-pager
|
receiver: team-Y-pager
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue