PCA (Prometheus Certified Associate) sample exam question with answer 422
Question:
How does Prometheus determine the path on which to scrape targets?
- Via the globally configured metrics_path attribute in the Prometheus configuration file
- Via the per-job metrics_path attribute in the Prometheus configuration file
- Via the globally configured --metrics-path command line flag
- Via the per-job --metrics-path-<job> command line flag
Answer:
B - correct answer. More at
scrape_config
A - is incorrect as this attribute is actually set per-scrape, not globally
C, D - is incorrect as there is no such command line flag