PCA (Prometheus Certified Associate) sample exam question with answer 248
Question:
What does the following metric_relabel_config do?
scrape_configs:
- job_name: example
metric_relabel_configs:
- source_labels: [__name__]
regex: database_errors_total
action: replace
target_label: __name__
replacement: database_failures_total
- tells prometheus to only scrape targets with the metric database_errors_total
- drops metric with the name `database_errors_total
- merges the metrics database_errors_total and database_failures_total
- renames the metric database_errors_total to database_failures_total
Answer:
D - correct answer