PCA (Prometheus Certified Associate) sample exam question with answer 295
Question:
What does the following config do?
scrape_configs:
- job_name: "demo"
metric_relabel_configs:
- source_labels: [__name__]
regex: docker_container_crash_total
action: replace
target_label: __name__
replacement: docker_container_restart_total
- Renames the metric docker_container_crash_total to docker_container_restart_total
- Drops all targets with the docker_container_crash_total metric
- Drops the docker_container_crash_total metric
- Replaces all labels fro docker_container_crash_total
Answer:
A - correct answer