learn-tech-writing-with-phoebe / Deep dive 3 of 4
Learn Tech Writing with Phoebe · Deep dive 3 of 4

Runbooks and ops docs

The on-call engineer at 2am is the reader you named in Session 1's audience statement, made literal. A runbook is the doc you write for them: a how-to guide under operational pressure, with the stakes turned all the way up.

🟣 Deep dive Self-paced On-call engineers & data teams 60-90 min self-study
0-10 · Why 10-35 · Anatomy 35-75 · Build the Pulse runbook 75-90 · Keep it alive
Part 0

Why this deep dive exists

When a pipeline breaks, the clock starts. Every minute of confusion is a minute of wrong data, a paged engineer, or a missed SLA. Google's SRE teams treat the doc that ends that confusion - the runbook - as infrastructure, not paperwork. This deep dive upgrades Pulse's Session 5 how-to into a real one.

Self-study - read at your pace ★ Try it now exercise Source: SRE practice + Diátaxis how-to
★ What you walk out with The canonical runbook anatomy, the one rule that separates a runbook from an ordinary how-to (verify after every action), and docs/runbook-low-alert.md built from Pulse's real commands, ready to link from the LOW alert itself.
Part 1 · covers SRE doc practice

Docs under pressure 10 min

A how-to guide assumes a calm, competent reader working through a task by choice. A runbook assumes a stressed reader who was just woken up. Same Diátaxis quadrant, stricter rules.

Self-studyRunbooks are infrastructure3 min▶

Google's SRE writing makes a blunt economic case: a good runbook lowers MTTR - mean time to recovery - by handing the responder a proven path instead of asking them to reinvent one under stress. The doc is part of the system's reliability, the same way monitoring and alerting are.

  • The 2am reader is your primary audience. This is Session 1's audience statement made concrete: they know your infra but not this specific failure, and they need to act, not learn.
  • Every alert should link to its runbook. An alert that fires with no linked recovery doc is half an alert - it announces a problem and abandons the responder.
  • A stale runbook is worse than none. A wrong command at 2am costs more than an honest blank. Runbooks get reviewed on a schedule, exactly like the delete-dead-docs rule from Session 7.
Self-studyA runbook is a how-to with stricter rules3 min▶

From Session 5 you know a how-to guide: prerequisites, actionable steps, no teaching. A runbook keeps all of that and adds three constraints the pressure demands:

Same step, described vs commanded ✗ How-to: description "Check the raw folder" reader translates the step translation = a delay under stress ✓ Runbook: exact command ls -la pulse/data/raw copy, paste, run - no translating same command, every responder A runbook keeps a how-to's steps but swaps descriptions for exact, copy-pasteable commands.
🔍 Click to zoom - runbooks give commands, not descriptions
  • Exact commands, not descriptions. "Check the raw folder" becomes ls -la pulse/data/raw. The reader copies and pastes; they do not translate.
  • Verify after every action. Each step says how to confirm it worked before moving on. This is the defining trait - more on it below.
  • Decision rules, not options. A how-to can say "you might also...". A runbook says "if the count is 0, go to step 4; otherwise go to step 5". No branching left to judgment.
Part 2 · covers the runbook template

Anatomy of a runbook 15 min

The canonical structure is stable across SRE teams. Read it top to bottom the way a responder does: what fired, what I need, what to do, how to know it worked, what if it did not, who to call.

Metadata + trigger owner · last-reviewed · which alert fires this Prerequisites access, tools, the repo checked out Steps, each with a verify line exact command → confirm result → next loop Troubleshooting common failure modes → what each means Escalation who to page when the steps run out The verify line after every action is what separates a runbook from a how-to guide.
🔍 Click to zoom - the runbook skeleton, read top to bottom under pressure
Self-studyThe eight parts4 min▶

Every reliable runbook carries these, in order:

PartWhat it answers
Title + unique ID + short descriptionWhat is this and can I search for it
Scope, owner, last-reviewed dateWho owns it, is it still trustworthy
Trigger / when to useWhich alert or symptom brings me here
PrerequisitesWhat access and tools I need first
Steps with exact commandsWhat do I run, precisely
Verification after each stepHow do I know that worked
TroubleshootingWhat if a step does not go as expected
Escalation contactsWho do I page when I am out of steps
Self-studyWhy the verify line matters3 min▶

The verify line is the runbook's whole reason to exist. Under stress, people skip ahead and assume a step worked. A runbook that says "re-run the pipeline" and stops has failed; one that says "re-run, then confirm daily_metrics.csv shows the day with events above 50" catches the case where the re-run silently changed nothing.

Real world

The restart that fixed nothing. A responder followed a runbook that said "restart the ingest service" and closed the incident. The service restarted fine, but the upstream feed was still down, so no data flowed. There was no verify line, so nobody checked. The alert re-fired 40 minutes later. One line - "confirm new rows arrive within 5 minutes" - would have caught it the first time.

The restart that fixed nothing, and the fix ✗ No verify line "restart the ingest service" incident closed, feed still down alert re-fired 40 minutes later ✓ Verify after every step restart, then confirm rows arrive "within 5 minutes" catches a silent no-op restart The verify line is the runbook's whole reason to exist: never assume a step worked.
🔍 Click to zoom - never assume a step worked, verify it
Build-along

Build the Pulse LOW-alert runbook ★ 30 min · build your own

Session 5 gave you docs/how-to-diagnose-low-day.md - a solid how-to. Now upgrade it into docs/runbook-low-alert.md by adding the metadata, exact commands, a verify line per step, a troubleshooting table, and escalation.

Add the metadata block: owner, last-reviewed date, and the trigger - the alert column reads LOW in daily_metrics.csv.

Turn each diagnostic into an exact command with a verify line. "Check raw files arrived" becomes a command plus what a healthy result looks like.

Write the troubleshooting table: three common causes, each with what it means and where it points.

Add the escalation line: who to page when the steps run out, and with what evidence in hand.

docs/runbook-low-alert.md# Runbook: LOW daily-events alert - ID: RB-001 - Owner: data-platform team - Last reviewed: 2026-07-17 - Trigger: the `alert` column reads `LOW` for any day in daily_metrics.csv (fires when a day has fewer than `alerts.min_daily_events` events) ## Prerequisites - Repo checked out, Python 3.10+, pyyaml installed - Read access to pulse/data/raw ## Steps 1. Identify the LOW day. Run: `grep LOW pulse/data/metrics/daily_metrics.csv` Verify: you have one or more dates. Note the earliest. 2. Check the raw files for that day arrived. Run: `ls -la pulse/data/raw` Verify: a CSV covering the LOW date exists and is non-empty. If it is missing or 0 bytes, the source did not deliver - go to Troubleshooting row 1. 3. Check how many rows survived cleaning. Run: `wc -l pulse/data/cleaned/*.csv` Verify: compare against the raw row count. A large gap means heavy filtering. 4. Check for a spike in filtered event types. Run: `cut -d, -f3 pulse/data/raw/*.csv | sort | uniq -c` Verify: every high-count type appears in config.yaml > events.valid_types. An unlisted type with a high count means a source changed - Troubleshooting row 2. 5. Decide: data problem or real traffic drop. Re-run the pipeline: `python3 pulse/ingest.py && python3 pulse/clean.py && python3 pulse/metrics.py` Verify: re-open daily_metrics.csv. If the day is still LOW and raw data looked healthy, it is a real traffic drop, not a pipeline fault. ## Troubleshooting | Symptom | Likely cause | Action | |---------|--------------|--------| | No raw file for the day | upstream feed did not deliver | escalate to the source team; do not re-run | | High count of an unlisted event type | a source started sending a new type | add it to valid_types if legitimate, re-run | | LOW only on weekends | threshold too high for low-traffic days | propose a weekday/weekend threshold | ## Escalation If steps 1-5 do not explain the LOW day, page the data-platform on-call with: the LOW date, the raw row count, and the cleaned row count.
Ops tip Link this runbook from the alert itself. The moment metrics.py writes LOW, the reader should be one click from RB-001 - that is the every-alert-links-a-runbook rule in practice.
Homework

Try it yourself ◐ 30-45 min

Source material

Official sources covered

This deep dive combines SRE documentation practice with the Diátaxis how-to model, applied to Pulse. Organization-specific incident tooling stays with each team.

✓ACM Queue: Why SRE Documents MatterPart 1: runbooks as infrastructure, MTTR, review cadence
✓Squadcast runbook templatePart 2: the eight-part anatomy
✓Diátaxis how-to guides (applied under pressure)Part 1: the stricter-how-to framing
✓Google documentation best practices: review cadencePart 1: stale runbook = wrong runbook
Check yourself

Three questions before you go 🎯 ◐ 90 seconds

1 · What upgrades an ordinary how-to into a runbook?

Pressure demands precision: copy-paste commands, confirmation after every action, and no branching left to a tired reader's judgment.

2 · An alert fires with no linked runbook. What's the problem?

Every alert should link its runbook. Without one, the responder starts from zero at the worst possible time.

3 · Why is a stale runbook worse than no runbook?

A confident but outdated instruction sends the responder down a broken path. Review on a schedule, like deleting dead docs.

Runbook cheat sheet · pin this

Eight partsTitle+ID · owner+reviewed · trigger · prerequisites · steps · verify · troubleshooting · escalation.
Verify every stepThe defining trait. "Do X" always followed by "confirm X worked" before moving on.
Exact commandsCopy-paste, not "check the folder". The reader translates nothing under stress.
Decision rules"If count is 0, go to step 4." No options left to a tired responder's judgment.
Link from the alertEvery alert is one click from its runbook. An alert with no runbook is half an alert.
Last-reviewed dateA runbook with no review date is a runbook nobody trusts. Re-verify on a schedule.
Stale beats blank? NoA wrong command at 2am costs more than honest silence. Prune like dead docs.
The 2am readerKnows the infra, not this failure, needs to act not learn. Session 1's audience, made literal.