Skip to content
mentoor

Topic 4 of 5 · 4 min read

Actionable alerts and SLOs

Goal: Rewrite noisy cause-based alerts into symptom-based SLO alerts that each link to a runbook.

Page a human only when users are being hurt or soon will be, and make every page say what is wrong and where to start. Alerts that fire often and need no action train people to ignore them, and then the real one is missed.

Check yourself · 1 of 3

Which alert is symptom-based?

Choose one answer

Why it matters

An on-call engineer woken at 3 a.m. by "CPU above 80 percent" who finds nothing wrong will soon mute that channel. The Google SRE book states the rule plainly: pages should be urgent, important, actionable and real. Anything else is a ticket or a dashboard.

How to do it

  1. Pick an SLI (service level indicator): a measure users feel, such as the share of requests that succeed in under 500 ms.
  2. Set an SLO (objective): a target over a window, for example 99.9 percent over 30 days. That leaves an error budget of 0.1 percent, about 43 minutes of full failure in 30 days.
  3. Alert on burn rate, meaning how fast the budget is being spent. A fast burn (for example 14 times the allowed rate for 5 minutes) pages now. A slow burn opens a ticket. The SRE workbook gives worked examples.
  4. Alert on symptoms, not causes. "Checkout error rate is 4 percent" is a symptom. "One pod restarted" is a cause that may be harmless.
  5. Attach a runbook link and context to each alert: what it means, the dashboard, the first three checks, and who to escalate to.
  6. Review alerts monthly. Delete or downgrade any that fired without action.

Before and after

# Before
- alert: HighCPU
  expr: cpu_usage > 0.8
  for: 1m

# After
- alert: CheckoutErrorBudgetFastBurn
  expr: sum(rate(http_requests_total{route="/checkout",status="5xx"}[5m]))
        / sum(rate(http_requests_total{route="/checkout"}[5m])) > 0.014
  for: 5m
  annotations:
    summary: "Checkout is failing for users and burning the error budget fast"
    runbook: "https://wiki.example.com/runbooks/checkout-errors"

What goes wrong

  • Cause-based pages. CPU, disk or restarts fire with no user impact.
  • No runbook. The responder spends 20 minutes working out what the alert means.
  • Thresholds from a guess. A 1 percent error rate may be normal for one route and a disaster for another.
  • Alerts nobody owns. An alert with no team name goes unanswered.

Examples

Cause turned into symptom

Three alerts fire together: DBConnectionsHigh, PodRestart, QueueDepthHigh. Replace them with one page, CheckoutLatencyP95High (p95 over 2 s for 10 minutes), and keep the other three as dashboard panels. The responder is paged once, for what users see.

A useful alert message

"checkout 5xx at 4.1% for 5 min (budget burning 30x). Dashboard: link. Runbook: link. Recent deploy: 14:02. Owner: payments." The responder knows the impact, where to look and whom to call without searching.

Key points

  • Page only for urgent, important, actionable problems; everything else is a ticket or a dashboard.
  • An SLO is a target for a user-facing SLI over a window, and the gap to 100 percent is the error budget.
  • Burn-rate alerts page on a fast spend of the budget and open tickets for a slow one.
  • Alert on symptoms users feel, such as error rate or latency, not on causes such as CPU.
  • Every alert links to a runbook and an owner, and alerts that fire without action are removed or downgraded.

Common mistakes

  • Paging on resource thresholds with no link to user impact.
  • Writing an alert with no runbook, owner or severity.
  • Setting an SLO of 100 percent, which leaves no error budget and makes every blip an incident.
  • Keeping alerts that fire weekly and are always closed with no action.

Check yourself · 2 of 3

A service has a 99.9 percent availability SLO over 30 days. What is the error budget?

Choose one answer

Check yourself · 3 of 3

Why does every page need a runbook link?

Choose one answer

Practice items, not counted towards your mastery.

Start here