PCA (Prometheus Certified Associate) sample exam question with answer 245

Question:
Where should alerting rules be defined?

  1. separate rules file
  2. prometheus configuration file
  3. export configuration file
  4. alertmanager configuration file
Answer:
A - correct. Alerts and recording rules should be defined in a separate rules file. This file then needs to be referenced in the prometheus.yml file as per:
rule_files:
- rules.yml