Challenge - 5 Problems
Prometheus and Grafana Integration Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Prometheus scrape configuration output
Given this Prometheus scrape config snippet, what will be the value of the 'job' label for metrics scraped from Kafka exporters?
Kafka
scrape_configs: - job_name: 'kafka' static_configs: - targets: ['localhost:9308']
Attempts:
2 left
💡 Hint
Look at the job_name field in the scrape_configs section.
✗ Incorrect
The 'job' label in Prometheus metrics is set from the 'job_name' field in the scrape_configs. Here, it is 'kafka'.
🔀 Workflow
intermediate2:00remaining
Steps to visualize Kafka metrics in Grafana
Which sequence correctly describes the steps to visualize Kafka metrics in Grafana after Prometheus is scraping Kafka exporter metrics?
Attempts:
2 left
💡 Hint
Start by ensuring Prometheus is scraping metrics before adding Grafana data source.
✗ Incorrect
First verify Prometheus scrapes metrics (4), then add Prometheus as Grafana data source (1), create dashboard (2), then add panels (3).
❓ Troubleshoot
advanced1:30remaining
Prometheus not scraping Kafka exporter metrics
Prometheus is not collecting metrics from Kafka exporter at localhost:9308. Which configuration mistake causes this?
Kafka
scrape_configs: - job_name: 'kafka' static_configs: - targets: ['localhost:9307']
Attempts:
2 left
💡 Hint
Check the port number in the targets list.
✗ Incorrect
The Kafka exporter runs on port 9308 by default. Using 9307 causes Prometheus to fail scraping.
🧠 Conceptual
advanced1:30remaining
Grafana alerting on Kafka lag
Which Prometheus query expression correctly triggers an alert when Kafka consumer lag exceeds 1000 messages?
Attempts:
2 left
💡 Hint
Consider grouping lag by consumer group to alert per group.
✗ Incorrect
Summing lag by group and checking if it exceeds 1000 triggers alert for groups with high lag.
✅ Best Practice
expert2:00remaining
Optimizing Prometheus scrape intervals for Kafka exporters
What is the best practice for setting Prometheus scrape interval for Kafka exporters to balance data freshness and system load?
Attempts:
2 left
💡 Hint
Consider typical Kafka metric update frequency and system resource usage.
✗ Incorrect
A 15-second interval balances timely metrics and reasonable load on exporters and Prometheus.