Covers runbook design: one runbook per alert, the structure (impact, triage checks, safe mitigations, verification, escalation), exact commands and queries, writing for a stranger under stress, automation, and keeping runbooks current through drills and post-incident updates.
A good runbook is one page per alert, linked from the alert, that lets someone who has never seen the service act safely in minutes. It says what fired and what users feel, gives numbered checks with copy-pasteable KQL, kubectl and dotnet-counters commands and what normal looks like, lists safe mitigations first (roll back, turn off a kill switch, scale out, restart one instance) with how to verify each worked, and says who to escalate to and when.
It's written for a tired stranger: decisions as if/then, no tribal knowledge, links to the dashboard. It stays current because it has an owner and a last-verified date, every incident ends with "update the runbook", and game days exercise it. The trade-off: runbooks cost upkeep, so steps you repeat often should become automation.
"I write a runbook for the person who gets paged at 3 am and has never touched this service. That changes everything about it. It has to be reachable in one click, so every alert carries a
runbook_urlpointing at the runbook for that alert, not a wiki home page. It starts with what fired in plain words and what users are probably feeling, so the responder can judge severity straight away. Then numbered checks: open this dashboard, run this KQL query, and here's what normal looks like versus broken. Every command is copy-pasteable, with the cluster and namespace filled in.Then the safe actions, in order of how safe they are: roll back the last deployment if it was in the last two hours, turn off the kill switch for the dependency that's failing, scale out, restart one instance. Each action says how to verify it worked: 'the error ratio on the dashboard should drop below 1% within five minutes'. Anything risky, like failing over the database or purging a queue, is marked as needing a second person or the owning team. And it ends with escalation: who owns the service, how to reach them, and when to raise the severity. For example, at [company] we [rewrote our runbooks into this one-alert-one-page format after an incident where on-call spent 25 minutes finding the right page], and [median time to mitigate on those alerts dropped from about 40 to about 15 minutes].
The hard part is keeping them true. Every runbook has an owner and a 'last verified' date; every postmortem has a standing action 'did the runbook help, and what changed?'; and we run game days where someone follows a runbook in staging without help. When a step is repeated every time, like 'restart the stuck consumer', it becomes a button or a script. The mistake I see is runbooks that describe the architecture instead of telling you what to do."
| Section | Contents | Example |
|---|---|---|
| What fired | Alert name, plain-language meaning, threshold | "Checkout 5xx burning the 99.9% budget at 14ร" |
| Impact | What users see, who is affected, likely severity | "Some customers can't pay; Sev 2 unless > 10% failing" |
| First checks | Numbered steps, links, queries, expected results | "1. Dashboard: is it one region or all? 2. Recent deploys?" |
| Safe mitigations | Ordered by safety, each with verify step | Roll back โ flag off โ scale out โ restart one pod |
| Risky actions | Need a second person or owner approval | Database failover, purge dead-letter queue |
| Escalation | Owner team, contact, when to raise severity | "No improvement in 20 min โ page payments on-call, declare Sev 1" |
| Background | Links to architecture, dependencies, past incidents | Kept short, at the bottom |
| Metadata | Owner, last verified date, related alerts | "Owner: checkout team; verified 2026-10-03" |
| Good | Bad |
|---|---|
| One alert, one page, linked from the alert | A 40-page wiki for the whole service |
| "Run this query; more than 50 rows means X" | "Check the logs" |
| Actions in order of safety, with how to verify | A list of things that might be wrong |
| Escalation with names and a time limit | "Contact the team" |
| Verified in the last 6 months | Mentions servers that were decommissioned |
After an incident where on-call spent 25 minutes finding the right page and then ran a stale command against a decommissioned cluster, the team moved to one runbook per alert in the service repo, with runbook_url required by CI on every alert rule. Over the next quarter, median time to mitigate on paged alerts went from about 40 minutes to about 15, and two game days found and fixed six broken steps before a real incident did.
Checks the candidate can write operational documentation that actually works during an incident and knows how to keep it accurate.
Green flags
Red flags
During an incident, people's working memory shrinks: they're woken up, stressed and often unfamiliar with the service. A runbook moves knowledge from the heads of the people who built the system into a document that works without them. It also makes response consistent: the same alert gets the same first steps no matter who is on call.
alert fires โโบ page with runbook_url โโบ runbook
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
impact + severity checks (decision tree) escalation
โ
safe mitigation โโบ verify โโบ still broken? โโบ next action / escalate
| Document | Scope | When written | Used when |
|---|---|---|---|
| Runbook | One alert or one operational task | Before incidents | During response, step by step |
| Playbook | A class of incident (e.g. "region outage", "data breach") with roles and comms | Before incidents | Coordinating a large incident |
| Postmortem | One past incident | After it | Learning, actions |
kubectl -n checkout rollout undo deploy/checkout-api, not "roll it back".A safe action is reversible, scoped and well understood: rolling back to the previous image, disabling a feature flag, scaling out, restarting one instance. Risky actions are irreversible or broad: deleting messages, failing over a database (possible data loss within the replication lag), running a data fix. Runbooks should make that difference visible, require a second person for risky ones, and say what to capture first (a dump, the dead-letter contents) before destroying evidence with a restart.
written step โโบ copy-paste script in the runbook โโบ parameterised script in the repo
โโบ one-click action (Azure Automation runbook, pipeline job, chat-ops) โโบ auto-remediation
Automate steps that are frequent, well understood and safe. Keep a human decision where judgement matters. Every automated action should log what it did into the incident channel.
runbook_url that resolves to an existing file.A runbook template with copy-pasteable checks, and a small xUnit test that keeps runbooks honest in CI.
# Runbook: CheckoutApiBudgetBurnFast
**Owner:** checkout team ยท **Last verified:** 2026-10-03 ยท **Severity:** Sev 2 (Sev 1 if > 10% of checkouts fail)
## What fired
Checkout 5xx ratio is burning the 99.9% monthly error budget at 14ร (1 h and 5 m windows).
## Impact
Some customers can't complete payment. Check the dashboard for the percentage failing.
## First checks (10 minutes max)
1. Open the [checkout dashboard](https://grafana.example.internal/d/checkout). One region or all?
2. Recent changes? `az monitor activity-log list --resource-group rg-checkout-aue --offset 2h -o table`
3. Which dependency? Run the query below. Normal: no dependency above 1% failures.
## Safe mitigations (in this order)
| # | Action | Command | Verify |
|---|---|---|---|
| 1 | Deploy in last 2 h? Roll back | `kubectl -n checkout rollout undo deployment/checkout-api` | Error ratio < 1% within 5 min |
| 2 | Pricing failing? Kill switch | Set `PricingLive` = off in App Configuration (30 s to apply) | Pricing dependency calls stop |
| 3 | CPU or ThreadPool saturated? Scale out | `kubectl -n checkout scale deployment/checkout-api --replicas=12` | p95 < 500 ms |
## Needs a second person
- Payment provider failover (contact payments on-call first).
## Escalation
No improvement after 20 minutes, or > 10% failing: declare Sev 1, page payments on-call via PagerDuty "payments-primary".
// Failing dependencies for checkout in the last 30 minutes
dependencies
| where timestamp > ago(30m) and cloud_RoleName == "checkout-api"
| summarize total = count(), failed = countif(success == false), p95 = percentile(duration, 95) by target, type
| extend failPct = round(100.0 * failed / total, 2)
| order by failPct desc
// RunbookTests.cs โ fails CI when a runbook is missing required sections or hasn't been verified recently.
namespace Ops.Tests;
using System.Globalization;
using System.Text.RegularExpressions;
using Xunit;
public sealed partial class RunbookTests
{
private const int MaxAgeDays = 90; // Tier 1 policy; use 180 for lower tiers
private static readonly string[] RequiredSections = ["## What fired", "## Impact", "## First checks", "## Safe mitigations", "## Escalation"];
public static TheoryData<string> Runbooks()
{
var data = new TheoryData<string>();
foreach (var path in Directory.EnumerateFiles(Path.Combine(AppContext.BaseDirectory, "runbooks"), "*.md"))
data.Add(path);
return data;
}
[Theory]
[MemberData(nameof(Runbooks))]
public void Runbook_has_required_sections_and_is_recently_verified(string path)
{
var text = File.ReadAllText(path);
foreach (var section in RequiredSections)
Assert.True(text.Contains(section, StringComparison.Ordinal), $"{Path.GetFileName(path)} is missing '{section}'");
var match = LastVerified().Match(text);
Assert.True(match.Success, $"{Path.GetFileName(path)} has no 'Last verified' date");
var verified = DateOnly.ParseExact(match.Groups[1].Value, "yyyy-MM-dd", CultureInfo.InvariantCulture);
var age = DateOnly.FromDateTime(DateTime.UtcNow).DayNumber - verified.DayNumber;
Assert.True(age <= MaxAgeDays, $"{Path.GetFileName(path)} was last verified {age} days ago");
}
[GeneratedRegex(@"\*\*Last verified:\*\*\s*(\d{4}-\d{2}-\d{2})")]
private static partial Regex LastVerified();
}
A runbook is a product for on-call, and I measure it like one: time from page to first mitigation, how often the runbook was used, and how often it was wrong. A senior engineer treats "the runbook didn't help" as an incident finding with an owner, not a shrug. The other senior instinct is knowing when a runbook is the wrong fix: if an alert's runbook always says "restart the consumer", the real fix is to automate the restart or fix the bug, and if an alert has no meaningful action, it shouldn't page at all.
Two practical choices. Granularity: one runbook per alert is the default, but closely related alerts (the fast and slow burn-rate alerts for the same SLO, say) can share one runbook with an anchor per alert, which halves upkeep without making the responder search. Verification cadence: I re-verify Tier 1 runbooks every 90 days and others every 180, because cloud resources, CLIs and dashboards change faster than people expect. Verification methods trade cost for confidence: a desk review is cheap but misses broken commands; a staging game day finds real breakage but costs an afternoon; running the read-only checks automatically in CI catches dead links and renamed resources for free.
| Option | When it fits | Cost | When not to |
|---|---|---|---|
| Written runbook | Judgement needed, varied causes | Upkeep, drills | Step is the same every time |
Scripted step linked from runbook (bash, PowerShell, az script in the repo) |
Repeated, safe, parameterised steps | Script maintenance | Rare, risky actions needing judgement |
| One-click action (Azure Automation runbook, pipeline job, chat-ops command) | Frequent safe actions on-call takes often | Permissions design, audit | Destructive operations |
| Auto-remediation (alert action group โ Automation / Logic App / function) | Frequent, well understood, reversible | Can hide recurring bugs; must log what it did | Anything destructive or poorly understood |
| Delete the alert | No action possible or needed | None | It's the only signal for real user impact |
Alert on symptoms users feel, such as the request error-rate or latency SLI, failed synthetic journeys or orders per minute dropping, because causes like CPU at 80% often hurt nobody and miss failures with no resource signal at all. The best symptom alert is SLO burn rate: how fast you are spending the error budget. With a 99.9% SLO, a 14.4ร burn over 1 hour (confirmed over 5 minutes) spends 2% of a 30-day budget and pages; 6ร over 6 hours pages; slower burns raise a ticket.
Every alert needs who gets paged (the owning team's rotation), the threshold and window, a severity that decides page versus ticket, a dashboard link and a runbook with the first mitigation steps. Cause metrics stay on dashboards for diagnosis. The trade-off: fewer pages means a slightly later warning for slow-building problems, which tickets cover.
Every minute of an outage costs customers, revenue and trust โ for a busy checkout that can be thousands of dollars a minute โ while the root cause can be found later from preserved telemetry. So responders ask "what changed?" and reach for the fastest, safest, reversible lever: roll back the release (an App Service slot swap or a previous container image), turn off the feature flag, scale out if it's genuinely capacity, fail over to Australia Southeast if a region is impaired, or shed load with rate limiting to protect the critical path.
Good mitigation is rehearsed (a rollback you've never practised is a new risk), done one change at a time and verified against the SLIs. The trade-off is speed versus evidence: grab the evidence first when it costs seconds (a memory dump, a log export, a note of the deploy id), because a restart or rollback can destroy what explains the cause โ but never delay mitigation by minutes to do it.
A feature flag lets you change behaviour without a deploy, which makes it one of the fastest mitigations you have. A kill switch is a long-lived ops flag around a risky dependency or expensive feature: when it misbehaves you turn it off in seconds instead of rolling back. A gradual rollout uses percentage or targeting filters (1% โ 10% โ 50% โ 100%) while you watch error and latency SLOs, so a bad change hurts a few users and is switched off, not rolled back.
In .NET I use Microsoft.FeatureManagement with Azure App Configuration, a refresh interval of about 30 seconds and a safe default if the store is unreachable. Flag changes are audited and annotated on dashboards. The trade-off is flag debt: every flag doubles code paths, so release flags get an owner and an expiry date.
How to tell it (STAR)
**S:** At [company] our on-call engineer spent [25 minutes] finding a runbook at 3 am and then ran a command against a cluster we'd decommissioned, so a checkout incident lasted [nearly an hour]. **T:** I [took the postmortem action / volunteered] to fix how we wrote and maintained runbooks. **A:** I proposed one runbook per alert stored in the service repo, with a standard structure: what fired, impact, numbered checks with KQL and kubectl commands, safe mitigations with verify steps, and escalation with a time limit. I added a CI test requiring sections and a recent last-verified date, made `runbook_url` mandatory on alert rules, and ran game days where someone else followed each runbook. **R:** The audit and game days fixed [19] broken runbooks, and median time to mitigate for paged alerts went from [about 40] to [about 15] minutes over the next quarter.
Last updated 23 Nov 2026.