PCA (Prometheus Certified Associate) sample exam question with answer 99
Question:
Consider the following Alertmanager routing configuration:
route:
receiver: a-team-email
routes:
- receiver: a-team-page
matchers:
- severity=~"high|critical"
- receiver: b-team-email
matchers:
- service="db"
routes:
- receiver: b-team-page
matchers:
- env="prod"
- receiver: a-team-page
matchers:
- service="db"
- env="prod"
Given an alert with the following labels, to which receiver will the alert be routed?
alertname: database-down
env: test
service: db
severity: low
- b-team-page
- a-team-email
- b-team-email
- a-team-page
Answer:
C - is the correct answer. More info at
route
A - b-team-page is incorrect as the given alert has env="test", not prod. Since the route associated with b-team-page failed to be matched, the alert is routed to the receiver designated by the parent route.
B - a-team-email is incorrect as it is associated with the default (root) route. Since the given alert matches the route corresponding to the b-team-email receiver, it never falls back to the default route.
D - a-team-page is incorrect as the given alert has severity="low", not high or critical as necessitated by the first a-team-page route. Additionally, since the given alert matches the route corresponding to the b-team-email receiver, it never reaches the next route associated with the a-team-page receiver