Sign inSign up free

1428. An Error-Budget Burn Alert

hard 40 XP ~18 minHands-on lab

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.

ToolHoldsAddress on this machine
Grafanadashboards and Explore for the three belowhttp://127.0.0.1:3000
Prometheusmetrics and alert ruleshttp://127.0.0.1:9090
Lokilogshttp://127.0.0.1:3100
Tempotraceshttp://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.

Task

Add an alert FrontendErrorBudgetBurn to the group shop-slo in /etc/obs/rules.yml:

  • It fires when 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).
  • It waits 2 minutes before firing, and has the label 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

TerminalNot started

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.