PCA (Prometheus Certified Associate) sample exam question with answer 577
Question:
What determines which labels are included in an alert generated from an alerting rule? (Select all that apply.)
- The labels that are present in the PromQL result
- The annotations that are present in the PromQL result
- The key-value pairs that are specified under the metadata attribute of the alerting rule
- The annotations that are attached via the annotations attribute of the alerting rule
- The labels that are attached via the labels attribute of the alerting rule
Answer:
A, E - are the correct answer. More at
alerting_rules
B - is incorrect as PromQL expressions yield labels, not annotations. Additionally, the question asks specifically about what labels are included in the result, not what annotations are included
C - is incorrect as there is no metadata attribute for alerting rules
D - is incorrect as the question asks which about what labels are included in the result, not what annotations