PCA (Prometheus Certified Associate) sample exam question with answer 452
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: prod
service: db
severity: medium
- a-team-email
- a-team-page
- b-team-page
- b-team-email
Answer:
C - is the correct answer. More at
route
A - is incorrect as it is associated with the default (root) route. Since one of its child routes matches the alert, it is not handled by the default route
B - is incorrect as the route associated with this receiver matches on alerts with a severity label with a value of high or critical. Since the given alert has a severity label with a value of medium, it does not match that route
D - is incorrect. Though the given alert does match the route associated with the b-team-email receiver, this route has a child that also matches. In this case, the alert is routed to the receiver associated with the child (b-team-page), not the parent. The receiver associated with the parent route would be used if none of the child routes matched