---
title: "How to Write an On-Call Handbook"
description: "This guide covers what a good on-call handbook answers, gives you a template to copy, and builds one in Oxynote, with live charts of the system's health at the top."
canonical_url: "https://oxynote.io/blog/write-an-on-call-handbook"
---

> Index of every page on this site: [llms.txt](https://oxynote.io/llms.txt)

On 31 January 2017, GitLab engineers were fixing a PostgreSQL replica that had fallen behind. To copy the database over again, they wiped the replica's data directory and ran `pg_basebackup`, which sat there with no output. While trying to get replication going, an engineer wiped the directory again, thinking they were on the replica. They were on the primary, and about 300 GB was gone before they stopped the command. Another engineer, who wasn't around that night, knew that `pg_basebackup` normally waits in silence. GitLab's [postmortem](https://about.gitlab.com/blog/2017/02/10/postmortem-of-database-outage-of-january-31/) adds:

<blog-quote author="GitLab" href="https://about.gitlab.com/blog/2017/02/10/postmortem-of-database-outage-of-january-31/" source="Postmortem of database outage of January 31">

Unfortunately this was not clearly documented in our engineering runbooks nor in the official `pg_basebackup` document.

</blog-quote>

Most incidents are smaller, but they often go the same way: what the on-call engineer needs is known by someone who isn't there. Some of it belongs in a runbook, the steps to fix one specific problem, such as a replica that has fallen behind. The rest belongs in the on-call handbook, the first page someone opens when they're paged. It should show how the system is doing before it explains anything, then say how bad the problem is, which runbook to open, and who to call.

This guide covers what a good on-call handbook answers, a template you can copy, and a handbook built in Oxynote, with live charts of the system's health at the top.

## Why the First Shift Goes Badly

Most on-call handbooks are a wiki page with the rotation, the severity levels, and a list of who to call. On a first shift, the gaps show up one page at a time:

- The alert says `HighErrorRate checkout-api`, and the handbook doesn't say which chart shows it or what normal looks like.
- The dashboard link opens a folder of 40 dashboards, some of them for services that no longer exist.
- The escalation list names someone who moved to another team last spring.
- The runbook describes the service as it was two releases ago.

Someone who has been on call for years knows which parts to skip. Someone on their first shift doesn't, so they search Slack for the last time it happened, or call someone senior.

Charity Majors, the co-founder and CTO of Honeycomb, gives managers [this rule](https://charity.wtf/2020/10/03/on-call-shouldnt-suck-a-guide-for-managers/) for on-call:

<blog-quote author="Charity Majors, Honeycomb" href="https://charity.wtf/2020/10/03/on-call-shouldnt-suck-a-guide-for-managers/" source="On Call Shouldn't Suck: A Guide For Managers">

Never send an alert to someone who isn't fully equipped and empowered to fix it.

</blog-quote>

For someone on their first shift, most of that equipment is the handbook.

The handoff at the end of a shift has gaps of its own. Google's [SRE Workbook](https://sre.google/workbook/on-call/) describes it as an email:

<blog-quote author="Google's SRE team" href="https://sre.google/workbook/on-call/" source="The Site Reliability Workbook, On-Call">

At the end of the shift, the on-call engineer sends a handoff email to the next engineer on-call.

</blog-quote>

A typical one says "payments were flaky on Tuesday night, keep an eye on them". The next engineer then has to find the payments chart, guess the time range, and work out what "flaky" looked like.

## What a Good Handbook Answers

An on-call engineer asks five questions: the first four when they're paged, the last at the end of the shift. A good handbook answers all five:

- **Is something wrong, and where**: a few charts of the system's health, at the top of the page.
- **How bad is it**: the severity levels (SEV1 for the worst, then SEV2 and SEV3), each with the number that decides it, such as failed payments above 2 percent for 10 minutes.
- **What to do first**: the first five minutes, then the runbook for the alert.
- **Who to call**: who owns each service, and when to escalate.
- **What to hand over**: the open issues, what changed, and what to watch next week.

Each answer should be easy to follow for someone who was asleep five minutes ago. That means links instead of directions, and numbers instead of judgment calls.

The rest of the handbook sets up the process around those answers: the rotation, how a new engineer gets ready for a first shift, how to communicate during an incident, what happens after one, and how the team looks after whoever is on call. Google's SRE book names the [three resources](https://sre.google/sre-book/being-on-call/) an on-call engineer needs most: clear escalation paths, well-defined incident-management procedures, and a blameless postmortem culture. The handbook is where the first two get written down.

The handbook doesn't repeat what other pages hold. It links to the [runbook](https://oxynote.io/blog/write-a-runbook) for each alert and the [service page](https://oxynote.io/blog/document-a-microservice) for each service.

## An On-Call Handbook Template to Copy

The template below works in any tool that stores text, such as Confluence, Notion, or a Markdown file in your repository. Its sections follow the questions above:

```md [oncall-handbook.md]
# On-Call Handbook

Start here when you're paged.

## Right Now

<The charts that show whether something is wrong, and where.>

## First Five Minutes

1. Acknowledge the page in <paging tool>.
2. Post in <channel> that you're on it.
3. Check the charts above and find the severity below.
4. Open the runbook for the alert, linked from the alert or under "Where Things Are".

## Severity

- SEV1: <what counts, with the number that decides it>. <What to do, and who to call>.
- SEV2: <what counts, with the number that decides it>. <What to do, and who to call>.
- SEV3: <what counts, with the number that decides it>. <What to do, and who to call>.

## Rotation

<Who is primary and secondary, for how long, when the handoff is, and how to swap a shift.>

## Before Your First Shift

<The access you need, such as the paging app, the monitoring tool, and the VPN, and a shift to shadow first.>

## Escalation

- <Service or area>: <team>. See <service page>.
- No answer in <time>: <who to call next>.

## Where Things Are

- Runbooks: <links>
- Service pages: <links>

## Communication

<Where to post updates, how often, and who tells customers.>

## Handoff

<Where the weekly handoff is written, and when it's discussed.>

## After an Incident

<When a postmortem is due, and where it goes.>

## Looking After Yourself

<Time off after a night page, and who takes over when you need a break.>
```

The weekly handoff gets a template of its own. The outgoing engineer fills it in before the handoff, then both engineers go through it together:

```md [oncall-handoff.md]
## <Dates>: <outgoing> to <incoming>

Incidents:

- <When, what happened, the severity, and what's still open>

What changed:

- <Deploys, config changes, and new alerts>

What to watch:

- <Anything likely to page next week>

- [ ] This week's SEV1 and SEV2 postmortems are drafted
- [ ] The paging tool shows <incoming> as primary
- [ ] We went through this together
```

In most tools, "Right Now" ends up as a link to a dashboard, so the engineer has to open another tool before they know whether anything is wrong.

## Build It in Oxynote

Oxynote is a wiki whose pages hold live charts and logs from your own data sources. So in Oxynote, "Right Now" can be the charts themselves, at the top of the handbook.

A paging tool such as PagerDuty or Opsgenie runs the rotation and sends the alert. The handbook is the page the engineer opens next.

The following screenshots come from a demo workspace for Lastport, a made-up shipping company. Its ships report their position over satellite, and shippers book containers on its website. Six engineers share the on-call rotation, and the handoff is on Monday morning.

### Start With the Charts

Type `%%` to add a **Live Metrics** block. Lastport's handbook opens with three of them in one row: how long ship positions take to arrive, the share of bookings that fail, and the longest time any ship has gone without reporting its position. Each runs a query on Lastport's PostgreSQL. This one finds the longest silence:

```sql
SELECT $__timeGroupAlias(ts, '$__interval'), max(minutes) AS "longest silence"
FROM vessel_silence
WHERE $__timeFilter(ts)
GROUP BY 1
ORDER BY 1
```

`$__timeFilter` keeps the rows inside the chart's time range, and `$__timeGroupAlias` groups them into buckets of `$__interval`, a size that fits that range. `max` keeps a short spike from being averaged away.

Give each chart a title that says what it measures, such as "Longest vessel silence". Lastport's page also has one sentence above the charts that says how to read them.

A paged engineer cares about the last few hours. So each of these charts has its own time range: click the chart's gear icon and set **Time Range** to **Last 3 hours**.

### Put Each Severity Rule on Its Chart

A severity rule with a number in it belongs on the chart that shows that number. Two of Lastport's SEV2 rules work this way: a ship silent for over 10 minutes outside a known gap in satellite coverage, and failed bookings above 2 percent for 10 minutes. Each goes on its chart as a threshold labeled `SEV2`. The line shows the number, and the severity list further down gives the rest of the rule. To add one, click the chart's gear icon, and under **Thresholds**, click **Add Threshold**.

![The failed bookings and longest vessel silence charts, each with a red SEV2 line, and the silence line crossing it](https://oxynote.io/images/blog/oncall-sev2.webp)

In the screenshot, one ship has been silent for 14 minutes, past the line. So the engineer sees a likely SEV2 before reading the rules.

### Draw the Severity Decision

The other severity rules depend on more than one question. Lastport's handbook draws them as a flowchart in a **Mermaid Diagram** block, which you add from the slash menu. Mermaid draws the diagram from a few lines of text, so a change to a rule shows up in a review like any other line.

Below the flowchart, a list gives each level in full. A callout holds the one rule that isn't about severity: a delay over 24 hours triggers Lastport's compensation policy.

![A severity flowchart from "Can shippers book and track?" to SEV1, SEV2, and SEV3, with a list of the levels and a callout below it](https://oxynote.io/images/blog/oncall-severity.webp)

### Link to the Runbooks and Service Pages

The handbook helps only if an engineer can find it when they're paged. Put its link in each alert, next to the runbook link, and in the on-call channel's topic.

Each failure in the severity list links to its runbook, and each team in the escalation list links to its service page. To link to a page, copy its address from the browser. To link to one section, click the drag handle next to a block and choose **Copy Link**.

When an engineer doesn't know which page they need, **⌘K** (**Ctrl+K** on Windows and Linux) searches every page, down to a line in a code block.

### Hold the Handoff on Its Own Page

The handoff changes every week, and the rest of the handbook rarely does. So Lastport keeps the handoffs on a child page, **On-call Handoffs**, with one entry per week, newest first. Each entry follows the handoff template, and its checklist is a **Checklist** block from the slash menu.

At the top of that page are two of the handbook's charts. Their **Time Range** is **Global time**, so they follow the **Metric time range** each person picks under **Variables** in the sidebar. That choice applies only to the person who makes it. So either engineer can set the charts to **Last 7 days** for the handoff, and nobody else's charts change.

![The On-call Handoffs page with the Variables panel set to the last 7 days, two charts with spikes, and the week's handoff entry](https://oxynote.io/images/blog/oncall-handoff.webp)

In the screenshot, both of the week's incidents show up as spikes above the entry that explains them.

### Review Changes to the Escalation Path

The handbook decides who gets woken up, so a change to it should be reviewed. Open **Page Options**, the **⋯** menu at the top right of the page, and click **Make Reviewable**. Edits then go to a draft, and the page everyone reads stays the same until the draft is merged. Leave **On-call Handoffs** non-reviewable, so each week's entry and its checklist don't wait for a review. With **Show Changes** on, the draft shows each change.

After a night of failed payments, Lastport's draft gives payments a team of their own in the escalation list, and pages the secondary on-call engineer after 10 minutes without an answer, instead of 15:

![A draft of the handbook's escalation list with "and payments" and "15" removed, and a new Payments line and "10" added](https://oxynote.io/images/blog/oncall-review.webp)

### Get Reminded to Read It Again

Teams and services change, and a handbook that names the old ones sends people the wrong way. A **Scheduled Reminder** asks the page's maintainers, the people listed in the page header, to read it through. Lastport's is set to 3 months.

The main version of a reviewable page is read-only, so add the reminder in the draft. Hover the page title, click the leaf icon next to it, click **Add Hook**, choose **Scheduled Reminder**, and pick **In 3 months**. Merging the draft copies it to the main version. When it fires, the maintainers get a notification in their **Inbox**. Once they've read the page, one of them opens the same menu and clicks **Got It, Remind Again in 3 Months**.

### The Whole Handbook

Put together, Lastport's handbook reads from top to bottom like the template: the charts first, then what to do, how bad it is, and who to call.

![Lastport's On-call Handbook with its charts, first five minutes, severity flowchart, and the sections below them](https://oxynote.io/images/blog/oncall-full.webp)

## Wrapping Up

A good on-call handbook answers what an on-call engineer asks: is something wrong, how bad is it, what to do first, who to call, and what to hand over. In Oxynote, the first two answers are the charts at the top of the page, with the SEV2 lines drawn on them.

A good place to start is your team's current handbook. Copy the template into a page, put the charts that show something is wrong at the top, and link each severity to its runbook. To decide a change to the process itself, see how to write [RFCs and ADRs](https://oxynote.io/blog/write-an-rfc-and-adr). To connect your data, see how to connect [Prometheus](https://oxynote.io/blog/connect-prometheus), [PostgreSQL](https://oxynote.io/blog/connect-postgresql), or [Loki](https://oxynote.io/blog/connect-loki).

Oxynote is open source and runs as one Docker container: [github.com/oxynote/oxynote](https://github.com/oxynote/oxynote). If you need help or have a suggestion, come talk to us on [Discord](https://discord.gg/mNJd5zJkvC).

## Sitemap

See the full [sitemap](https://oxynote.io/sitemap.md) for all pages.
