PCA (Prometheus Certified Associate) sample exam question with answer 373
Question:
How do you specify which targets Prometheus should scrape?
- On a per-job basis in the Prometheus configuration file via the static_configs and *_sd_configs attributes
- Globally via the --service-discovery command line argument
- Globally in the Prometheus configuration file via the static_configs and sd_configs attributes
- Globally via the --target command line argument
Answer:
A - is the correct answer. More at
scrape_config
B, D - is incorrect as there is no such command line argument
C - is incorrect as targets are configured on a per-scrape job basis