Exercise 7 of 8 · Prometheus alert rules · About 20 min
A checkout alert, and the rule behind it
Trigger a real sustained-condition alert, inspect pending/firing states, and change its rule safely.
Keep your stack running. In Codespaces, use labs/observability and the Ports tab for tool URLs; locally, use the extracted baodium-observability folder. Earlier exercises establish the signals used here.
Before you run it
Can a single failed request trigger this rule? Read its rate guard, range window and for duration before generating load.
Read the rule before testing
Open prometheus/alerts.yml. CheckoutFailuresHigh requires an error ratio above 10%, more than one request per second, and a five-second sustained condition. Windows are shortened for this local exercise.
The rule describes a measured customer symptom and a low-traffic guard. A separate rule handles an unavailable scrape target.
Help with this exercise
Do not infer firing from the YAML alone. The expression, scrape history, request-rate guard and for duration must all be satisfied.
Need a hint or a troubleshooting path?
Do not infer firing from the YAML alone. The expression, scrape history, request-rate guard and for duration must all be satisfied.
Check a common misconception
A rule in YAML is not a firing alert. Evaluation must satisfy the expression continuously for its configured duration.
Before you move on
- What to keep
- Record the evaluated rule, observed pending/firing states and the traffic conditions. Preserve reports/alerts.json after actual firing.
- What to explain
- Explain how the traffic guard limits low-volume noise and what the separate missing-target alert detects.
- A question to take further
- What additional routing, ownership and delivery evidence would you need before claiming this alert can page an on-call engineer?
Write what you found
Stop only checkout with docker compose stop checkout and distinguish a missing target from a healthy zero-error service. Start it again before recovery.
Stop the stack when you finish
Continue to the next exercise with the stack running. When finished, stop and remove only this lab’s Compose services and volumes.
node lab.mjs down