Challenge - 5 Problems
Prometheus Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Prometheus Query Output for HTTP Request Count
Given a Prometheus metric
Assume the metric increments by 10 requests every minute consistently.
http_requests_total that counts all HTTP requests, what is the output of this query?sum(rate(http_requests_total[5m]))Assume the metric increments by 10 requests every minute consistently.
Microservices
sum(rate(http_requests_total[5m]))
Attempts:
2 left
💡 Hint
Think about how rate calculates per second over the 5-minute window.
✗ Incorrect
The rate function calculates the per-second average increase over the last 5 minutes. Since 10 requests happen every minute, that's 50 requests in 5 minutes. Dividing 50 by 300 seconds gives 0.1666667 per second. Summing over all instances (assuming 2 instances) doubles it to 0.3333333.
❓ Configuration
intermediate2:00remaining
Prometheus Scrape Configuration for Multiple Targets
Which Prometheus scrape configuration correctly scrapes metrics from two microservices running on ports 8080 and 9090 on the same host?
Attempts:
2 left
💡 Hint
Targets should be a list of strings, each string is host:port.
✗ Incorrect
Option C correctly lists both targets as separate strings in a single list. Option C splits targets into two lists which is invalid. Options C and D use incorrect separators inside one string.
❓ Troubleshoot
advanced2:00remaining
Diagnosing Missing Metrics in Prometheus
You configured Prometheus to scrape a microservice, but no metrics appear for it in the Prometheus UI. Which of the following is the most likely cause?
Attempts:
2 left
💡 Hint
Check if the microservice endpoint for metrics is reachable and returns data.
✗ Incorrect
If the microservice does not expose metrics on the expected endpoint, Prometheus cannot scrape any data. Disk full or scrape interval issues would cause delays or errors but not complete absence. Incorrect queries affect display, not scraping.
🔀 Workflow
advanced2:00remaining
Prometheus Alerting Workflow
Which sequence correctly describes the workflow for alerting when a microservice's error rate exceeds a threshold using Prometheus and Alertmanager?
Attempts:
2 left
💡 Hint
Think about the order from data collection to notification.
✗ Incorrect
Prometheus first scrapes metrics, then evaluates alert rules, sends alerts to Alertmanager, which then sends notifications. Other orders break this logical flow.
✅ Best Practice
expert2:00remaining
Optimizing Prometheus Metrics for High-Cardinality Labels
Which approach is best to reduce performance issues caused by high-cardinality labels in Prometheus metrics?
Attempts:
2 left
💡 Hint
High-cardinality labels create many time series, which can slow down Prometheus.
✗ Incorrect
Removing or limiting labels with many unique values reduces the number of time series, improving performance. Increasing scrape interval reduces data but doesn't fix cardinality. Storing all raw metrics increases load. Adding more labels increases cardinality.