Challenge - 5 Problems
API Monitoring Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the output of this curl command?
You run this command to check an API endpoint status:
What output will this command produce if the API is healthy?
curl -s -o /dev/null -w "%{http_code}" https://api.example.com/statusWhat output will this command produce if the API is healthy?
Rest API
curl -s -o /dev/null -w "%{http_code}" https://api.example.com/statusAttempts:
2 left
💡 Hint
The command outputs the HTTP status code only.
✗ Incorrect
The curl command with -w "%{http_code}" prints the HTTP status code. 200 means success.
🧠 Conceptual
intermediate1:30remaining
Which alert condition best detects API downtime?
You want to create an alert for your API monitoring tool. Which condition below best detects when the API is down?
Attempts:
2 left
💡 Hint
Server errors indicate downtime or failure.
✗ Incorrect
HTTP 500 and 503 status codes indicate server errors or service unavailable, signaling downtime.
❓ Configuration
advanced2:00remaining
Which Prometheus alert rule triggers on high API error rate?
Given this Prometheus metric: api_request_errors_total counts API errors, and api_requests_total counts total requests.
Which alert rule triggers if error rate exceeds 5% over 5 minutes?
Which alert rule triggers if error rate exceeds 5% over 5 minutes?
Attempts:
2 left
💡 Hint
Use rate() to calculate per-second increase over time.
✗ Incorrect
Option A calculates the error rate as the ratio of error requests to total requests over 5 minutes using rate(), then triggers if above 5%.
❓ Troubleshoot
advanced2:00remaining
Why does this alert never trigger?
You configured an alert:
But it never triggers even when the API is down. What is the likely cause?
alert: ApiDown
expr: up{job="api"} == 0
for: 10mBut it never triggers even when the API is down. What is the likely cause?
Attempts:
2 left
💡 Hint
Check if the metric used in expr is available.
✗ Incorrect
If the 'up' metric is not scraped for the API job, the expression never evaluates to true, so alert never fires.
🔀 Workflow
expert2:30remaining
Order the steps to set up API monitoring with alerting
Arrange these steps in the correct order to set up API monitoring and alerting:
Attempts:
2 left
💡 Hint
Think about defining what to measure before collecting data.
✗ Incorrect
First define what to measure, then collect data, then create alerts, finally test them.