Runbook

On this page 7

A runbook is a documented, step-by-step operational procedure that tells an engineer exactly how to carry out a routine task or respond to a specific, known condition in a production system. In DevOps and cloud operations, runbooks turn the knowledge of experienced operators into repeatable instructions that any qualified person on an on-call rotation can execute under pressure.

A good runbook answers three questions quickly: what triggered this, what to check, and what to do next. It is narrower than a general manual and more prescriptive than architecture documentation, and in mature teams it increasingly becomes executable automation rather than a page of prose.

How a runbook works during operations

A runbook works by binding a known trigger to a tested response. The trigger is usually an alert, a scheduled maintenance window or a service request; the response is an ordered sequence of diagnostic checks, decision points and corrective actions, each with an expected result that confirms the step succeeded.

Most production runbooks follow the same internal structure. The table below lists the components that experienced site reliability engineering teams expect to find and the purpose of each one.

ComponentPurposeTypical content
Trigger and scopeStates when the runbook appliesAlert name, symptom, affected service
PrerequisitesEnsures the operator can actRequired access, tools, approvals
Diagnostic stepsConfirms the actual causeQueries, dashboards, log searches
Remediation stepsRestores normal serviceCommands, scripts, configuration changes
VerificationProves the fix workedMetrics returning to baseline
RollbackReverses a harmful changeExact undo commands
Escalation pathHands off when steps failOwning team, severity thresholds
Core components of an operational runbook

The most important design principle is that every step must be unambiguous. A phrase such as “restart the service if needed” forces the operator to make a judgment at 3 a.m.; a well-written runbook states the exact condition that justifies the restart and the exact command that performs it.

Types of runbooks and levels of automation

Runbooks differ mainly in how much of the work a machine performs. Teams typically progress from written instructions toward fully automated remediation as a procedure proves stable and frequent enough to justify the engineering effort.

LevelWho executesBest suited for
Manual runbookEngineer follows written stepsRare or high-judgment tasks
Semi-automated runbookEngineer triggers scripted stepsFrequent tasks needing human approval
Fully automated runbookOrchestration tool runs end to endWell-understood, low-risk fixes
Self-healing automationSystem reacts to alerts directlyHigh-volume, predictable failures
Runbook automation levels

Executable formats are common in cloud environments. Teams store runbooks as code in version control, for example as Jupyter notebooks, shell scripts, Ansible playbooks or cloud-native automation documents, so that each change is reviewed like application code and the runbook cannot silently drift from the infrastructure it manages.

Automation does not eliminate the written layer. Even a fully automated runbook needs a human-readable description of what it does, when it should not run and how to stop it, because operators must be able to intervene safely when automation behaves unexpectedly.

A runbook is often confused with a playbook, a standard operating procedure or an incident postmortem. The distinction matters because each document serves a different moment in the operational lifecycle, and mixing them produces documents that are too long to use during an incident.

DocumentFocusLevel of detailWhen it is used
RunbookOne specific task or alertExact commands and checksDuring execution
PlaybookA class of situationsRoles, strategy, communicationCoordinating a response
Standard operating procedureOrganizational processPolicy-level stepsCompliance and training
Incident postmortemA past incidentTimeline, causes, actionsAfter recovery
Runbook versus related operational documents

The relationship is cyclical. A playbook for a major outage may link several runbooks for individual services, and an incident postmortem frequently produces a new or corrected runbook as one of its action items, which is how operational knowledge accumulates over time.

Writing and maintaining effective runbooks

An effective runbook is written for the least experienced person who might need it, not for its author. It assumes stress, fatigue and incomplete context, so it favors short numbered steps, copyable commands and explicit expected outputs over narrative explanation.

  • Link every alert to a runbook so that the notification itself tells the responder where to start.
  • Use copyable commands with placeholders clearly marked, rather than prose descriptions of commands.
  • State expected outputs after each diagnostic step so the operator knows whether to continue.
  • Assign an owner and a review date, because an unowned runbook decays as infrastructure changes.
  • Test runbooks regularly through game days or staging environment drills, not only during real incidents.

Maintenance is where most runbook programs fail. Cloud infrastructure changes weekly through CI/CD pipelines, while documentation is updated rarely, so teams should review runbooks after every use and treat a step that did not work as a defect to be fixed immediately.

Common runbook failures and how to prevent them

Runbook problems usually surface at the worst possible time, during an active incident. The following table summarizes the most frequent failure patterns, their root causes and the corresponding fixes that experienced teams apply.

SymptomLikely causeFix
Commands fail or reference missing hostsDocumentation driftStore as code, review after each change
Responder cannot find the runbookNo link from the alertEmbed the runbook link in alert metadata
Steps require unavailable permissionsPrerequisites not documentedList access needs and pre-grant them
Operator improvises halfway throughAmbiguous decision pointsDefine explicit conditions for each branch
Same runbook runs dozens of times weeklyExcessive toilAutomate it or fix the underlying cause
Runbook failure patterns and remedies

The last row deserves emphasis. A runbook that is executed constantly is a signal that the system itself needs fixing. Site reliability engineering practice treats repetitive manual work as toil, and the right response is usually to eliminate the failure mode rather than to perfect the instructions for living with it.

In plain words

A runbook is a recipe for keeping a computer system healthy. When something specific goes wrong, or when a regular chore needs doing, the runbook lists the exact steps to follow, in order, with a way to check that each step worked.

Think of the laminated checklist a pilot uses when a warning light comes on. The pilot does not have to invent a solution under pressure. The runbook gives technical teams the same calm, tested path, so that anyone on duty can fix a known problem quickly and the same way every time.

A real-world example

An online retailer runs its checkout service on a managed Kubernetes cluster in a public cloud. One recurring alert fires when the database connection pool exceeds 90 percent of its limit. Before the team wrote a runbook, each on-call engineer handled it differently, and resolution times ranged from 10 minutes to over an hour.

The team wrote a runbook linked directly from the alert. It instructs the responder to check a specific dashboard, run a query that lists long-running database sessions, terminate sessions older than five minutes from a known batch job, and confirm that pool usage drops below 60 percent. It also specifies escalation to the database team if usage stays high for 15 minutes.

Within a quarter, median resolution time fell to about eight minutes. Because the steps were now well understood, the team converted the diagnostic and termination steps into a semi-automated script that the responder approves with a single command, and an incident postmortem later led to a fix in the batch job itself.