An Error-Budget Burn Alert
A small online shop promises that 99% of the requests that reach frontend succeed, over 30 days. Anything that answers with a 5xx status counts as a failure. The current error alert pages on any 5-minute blip, so the team wants a burn-rate alert instead.
frontend counts its requests in http_server_requests_total, labelled with service, route and status.
| Tool | Holds | Address on this machine |
|---|---|---|
| Grafana | dashboards and Explore for the three below | http://127.0.0.1:3000 |
| Prometheus | metrics and alert rules | http://127.0.0.1:9090 |
| Loki | logs | http://127.0.0.1:3100 |
| Tempo | traces | http://127.0.0.1:3200 |
Open Grafana and Prometheus with the buttons above the terminal. Prometheus reads /etc/obs/prometheus.yml and the rules in /etc/obs/rules.yml.
Add an alert FrontendErrorBudgetBurn to the group shop-slo in /etc/obs/rules.yml:
frontend is spending its error budget 6 times faster than the objective allows, measured over both the last 30 minutes and the last 5 minutes (both must be above the threshold).severity: page.Prometheus must have loaded it. The shop has been failing for about ten minutes, so it should be pending or firing now; it must not have been true before the failures started.
Keep the two existing alerts.
About this machine
Ubuntu 24.04 with no internet access, running the real Prometheus, Loki, Tempo and Grafana (unmodified) and a simulated shop that reports to them. Once the machine is running, Grafana and Prometheus open in a new tab from the buttons above the terminal. The history goes back about an hour. curl, jq and promtool are installed. The grader checks your answer, not the commands you typed. BrokenCluster is not affiliated with, endorsed or sponsored by Grafana Labs or the Prometheus project.
Part of Observability in Practice. Next step: The Shop Is Slow: Find Where It Starts
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.