PCA (Prometheus Certified Associate) sample exam question with answer 75
Question:
Which of the following can be used to drop specific targets from a scrape?
- metric_relabel_configs with action keep
- metric_relabel_configs with action drop
- relabel_configs with action labeldrop
- relabel_configs with action keep
Answer:
D - While it may seem counterintuitive, action keep will drop all targets that do not match the regular expression and keep the ones that do. Check
relabel_config and
metric_relabel_config.
A, B - is incorrect as metric_relabel_configs affect metrics, not targets.
C - is incorrect as action labeldrop affects labels, not targets