Skip to content
Folio Wiki

Runbook Template (Markdown) for On-Call and Operations

A runbook is a step-by-step procedure for one specific alert or operation; a playbook is a broader plan for a type of situation, with roles and decisions. This Markdown runbook template covers trigger, triage, exact commands with expected output, rollback and escalation. Copy it, download the .md file, or read the filled example below.

Free to use, no attribution required (CC0).

Updated

Open in Folio demo

Runbook: {{Alert or operation name}}

Service {{Service name}}
Owner {{Team or name}}
On-call channel {{Channel or paging policy}}
Severity if unresolved {{SEV1 / SEV2 / SEV3}}
Last tested {{YYYY-MM-DD}} by {{Name}}
Next review {{YYYY-MM-DD}}

When to use this

The alert name, the symptom, the threshold. Paste the alert text so searching for it finds this page.

  • Alert: {{alert_name}}
  • Symptom: {{What the user or the dashboard shows}}
  • Do not use if: {{When another runbook applies — link}}

Impact

  • Who is affected: {{...}}
  • What breaks: {{...}}
  • Time budget: {{How long before this becomes a SEV1}}

Before you start

  • Access to {{system, role, VPN}}
  • Tools: {{kubectl, psql, cloud console}}
  • Dashboards open: {{link}}
  • Change freeze or maintenance window checked: {{link}}

Triage

Edit the labels so the flowchart matches your service.

flowchart TD
    A[Alert fires] --> B{Is the service up?}
    B -- No --> C[Go to step 1: restart and check logs]
    B -- Yes --> D{Error rate above threshold?}
    D -- Yes --> E[Go to step 3: roll back the last change]
    D -- No --> F[Check for a false alarm and tune the alert]
    C --> G{Recovered?}
    G -- Yes --> H[Verify and close]
    G -- No --> I[Escalate]
    E --> G

Procedure

Step 1. {{Check the current state}}
{{command}}

Expected: {{expected output}} If different: {{what it means and what to do}}

Step 2. {{Mitigate}}
{{command}}

Expected: {{expected output}} If different: {{...}}

Risky step: {{what can go wrong}}. Rollback: see "Rollback" below.

Step 3. {{Next action}}
{{command}}

Expected: {{...}} If different: {{...}}

Verify

  • {{Metric or health check is back to normal: link to dashboard}}
  • {{A test request succeeds: command}}
  • {{No new alerts for N minutes}}

Rollback

  1. {{How to undo step 2}}
  2. {{How to undo step 3}}
  3. {{Confirm the previous state}}

Escalation

Condition Who How
No progress after {{N}} minutes {{Secondary on-call}} {{Paging policy or phone}}
Data loss suspected {{Incident commander}} {{Channel}}
Customer-visible outage {{Communications owner}} {{Status page, template link}}

Communication

  • Update {{channel}} when you start, every {{N}} minutes, and when resolved.
  • Status page: {{link and who updates it}}

Known problems

Symptom Cause Fix
{{...}} {{...}} {{...}}

Background (read after the incident)

{{How the system works, why the steps work, links to architecture pages.}}

After the incident

  • Fix anything in this runbook that was wrong or unclear
  • Write a postmortem if the incident met the criteria: {{link}}

Revision history

Date Author Change
{{YYYY-MM-DD}} {{Name}} First version

Want to see it as a real wiki page? Open this template in the Folio demo, where it is a normal Markdown page.

How to use it

  1. Step 1: Start from the alert. Create one runbook per alert or per recurring operation, and put its link in the alert text. Fill in "When to use this" and "Impact" first.

  2. Step 2: Write steps as exact commands. For each step, give the command, the expected output, and what to do if the output differs. Do the procedure on a staging system while you write.

  3. Step 3: Test it with someone who did not write it. Have another engineer follow it cold, fix every place they hesitated, and set the "last tested" date and the owner.

What makes a good runbook

It is written for a tired reader. Short steps, one action each, commands that can be copied and pasted, and no background reading before the first action. Explanations go in a separate section at the bottom.

Every step says how to know it worked. An expected output after each command removes guessing at the worst time. The runbook should also say what to do if the output does not match.

It has a way out. Rollback or a safe stop for each risky step, and an escalation table with names, channels and the conditions for calling them. A runbook that only moves forward turns a small incident into a large one.

It is tested and owned. Untested runbooks fail the first time they matter. Record the last test date, the owner, and the review cycle, and fix the runbook as part of every incident that used it.

What is the difference between a runbook and a playbook?

Short answer: a runbook says how to do one thing; a playbook says how to handle one kind of situation. A runbook is a procedure for a known alert or task, written as exact commands with expected results, that any on-call engineer can follow. A playbook covers a wider scenario, such as a major outage or a data breach, and sets out roles, decisions, communication and which runbooks to run.

The words are not used the same way everywhere. Some teams call their step-by-step procedures playbooks, and some tools use "playbook" for an automated workflow. Pick one meaning, write it at the top of your handbook, and keep each document to one job.

CriterionRunbookPlaybook
ScopeOne alert, task or systemA type of situation across systems and people
Starts fromThe alert or the task nameThe kind of event, such as a major outage
ReaderThe engineer on callThe incident lead, responders and communicators
ContentsCommands, expected output, rollbackRoles, decision points, escalation, communication, links to runbooks
StyleNumbered steps, copy-paste commandsChecklists and decision trees
LengthOne screen of steps, plus a background sectionSeveral pages are normal
UpdatedAfter every incident that used itAfter drills and after major incidents

A filled-in runbook example

The example is for a fictional alert on a fictional service. The service, team, commands and numbers are invented, so adapt them rather than copy them. Notice that every step has an expected result and an "if different" branch, and that the risky step names its rollback.

Example runbook (fictional service), Markdown
# Runbook: RelayDigestQueueBacklog (EXAMPLE, fictional service)

| | |
|---|---|
| **Service** | relay-digest-worker |
| **Owner** | Notifications team |
| **On-call channel** | #oncall-notifications |
| **Severity if unresolved** | SEV2 |
| **Last tested** | 2027-02-10 by Mateo Silva |
| **Next review** | 2027-08-10 |

## When to use this

- **Alert:** `RelayDigestQueueBacklog` (queue depth above 5,000 for 10 minutes)
- **Symptom:** morning digests arrive late or not at all
- **Do not use if:** pushes for urgent messages are also late — use the push-gateway runbook

## Impact

- **Who is affected:** users with quiet hours enabled
- **What breaks:** the digest after quiet hours; urgent pushes are not affected
- **Time budget:** 60 minutes before this becomes a SEV1 (digests are the first thing users see in the morning)

## Before you start

- [ ] Access to the production cluster (role: notifications-oncall)
- [ ] Tools: kubectl, the queue CLI
- [ ] Dashboard open: "Digest worker" in the monitoring tool
- [ ] No deploy in progress (check the release channel)

## Triage

```mermaid
flowchart TD
    A[Alert fires] --> B{Workers running?}
    B -- No --> C[Step 1: restart workers]
    B -- Yes --> D{Queue depth falling?}
    D -- Yes --> E[Wait 10 minutes, then verify]
    D -- No --> F[Step 2: scale workers up]
    C --> G{Recovered?}
    F --> G
    G -- Yes --> H[Verify and close]
    G -- No --> I[Escalate]
```

## Procedure

### Step 1. Check the current state

```bash
kubectl -n notifications get pods -l app=relay-digest-worker
```

**Expected:** at least 3 pods in `Running` state.
**If different:** pods in `CrashLoopBackOff` mean a bad deploy; go to the rollback section.

### Step 2. Scale the workers up

```bash
kubectl -n notifications scale deploy/relay-digest-worker --replicas=8
```

**Expected:** `deployment.apps/relay-digest-worker scaled`; within 5 minutes the queue depth on the dashboard starts to fall.
**If different:** if the queue does not fall, the workers may be failing on one message; check the logs in step 3.

> Risky step: more workers raise the load on the database. Roll back to 3 replicas when the queue is empty.

### Step 3. Look for a poison message

```bash
kubectl -n notifications logs deploy/relay-digest-worker --tail=100 | grep -i error
```

**Expected:** no repeated error for the same message id.
**If different:** note the id and escalate to the Notifications team lead; do not delete it without their approval.

## Verify

- [ ] Queue depth is under 500 on the dashboard
- [ ] A test digest reaches the test account
- [ ] No new alerts for 30 minutes

## Rollback

1. Scale back: `kubectl -n notifications scale deploy/relay-digest-worker --replicas=3`
2. Confirm three pods are `Running` and the queue depth is stable.

## Escalation

| Condition | Who | How |
|---|---|---|
| No progress after 30 minutes | Secondary on-call | Paging policy "notifications-secondary" |
| Same message fails repeatedly | Notifications team lead | #oncall-notifications |
| Digests missing for more than 2 hours | Incident commander | Start an incident channel |

## Known problems

| Symptom | Cause | Fix |
|---|---|---|
| Queue grows only on Monday mornings | Weekend backlog of held messages | Scale up before 07:00 UTC |

## After the incident

- [ ] Fix anything in this runbook that was wrong or unclear
- [ ] Write a postmortem if digests were late for more than 2 hours

Frequently asked questions

What is the difference between a runbook and a playbook?

Usage varies. Commonly, a runbook is a precise procedure for a specific task or alert, and a playbook is a broader plan for a type of situation, with decisions and roles. The table above sets them side by side. Use whichever word your team uses and make each document do one job.

What should a runbook contain?

Trigger, impact, prerequisites and access, triage steps, the procedure with commands and expected results, verification, rollback, escalation contacts, and known problems. This template has a section for each.

How is a runbook different from an SOP?

An SOP describes a routine business process. A runbook describes an operational procedure in a technical system, often under time pressure, with commands and failure branches. They share the same logic, so the SOP template is a good starting point for non-technical processes.

Where should runbooks be stored?

In version control next to the service they describe, or in a wiki that on-call engineers can reach when your main infrastructure is down. Check that you can open them without your own VPN or single sign-on.

Can a runbook be automated?

Many steps can. Start by writing the manual version, then turn the most repeated and least risky steps into scripts, and call the script from the runbook with the expected output. Keep the manual path as a fallback.

Runbooks in Git, next to the service

In Folio a runbook is a Markdown page in the same Git repository as the service it describes, so changes go through the normal review and the history shows who changed a command. Code blocks, tables and Mermaid flowcharts render in the editor, and the built-in assistant can answer "what do I do when the queue backs up?" from the runbook pages; with a Sources: rule in its .agent folder it shows which page it used.