What Is a Runbook? Meaning, Template and Example
Author: Kevin Baur BSc
Published on
Contents
The alert fires at 3 a.m., the website is down, and the colleague who set up the server is on holiday. Now it matters whether the fix is written down or someone has to improvise. This guide explains what a runbook is, how it differs from a playbook and an SOP, what belongs in one, what an example looks like and how to write your first runbooks in six steps.
What is a runbook?
Wikipedia defines a runbook as a compilation of routine procedures and operations that a system administrator or operator carries out. It typically contains procedures to start, stop, supervise and debug a system, plus procedures for special requests and contingencies. A runbook can be electronic or on paper. Its purpose is to let other operators with the prerequisite expertise manage and troubleshoot a system without calling the person who built it.
Today a runbook usually lives in a wiki, a ticketing system or a Markdown file in a repository. In its Well-Architected Framework, AWS sets the minimum standard as a step by step text document. A first runbook needs nothing more.
One thing to know when you search for the term: in Microsoft Azure, a runbook means something narrower. According to Microsoft Learn, an Azure Automation runbook is a script, for example in PowerShell or Python, or a graphically built workflow that the service runs. That is an automated runbook. This guide covers the runbook as a written procedure, which you can automate later.
Runbook vs playbook vs SOP
The three terms are often confused. PagerDuty draws the line between runbook and playbook like this: a playbook covers the overall response to a larger issue or event and can include several runbooks and team members. A runbook covers one task. In PagerDuty's analogy, the runbook is the recipe and the playbook is the guide to hosting the whole event.
| Aspect | Runbook | Playbook | SOP |
|---|---|---|---|
| Answers | How do I do exactly this technical task? | How do we respond to an event as a team? | How is this activity done correctly in the company? |
| Scope | one task or one known problem | a whole scenario with roles | one activity, often outside IT |
| Typical trigger | alert, ticket, scheduled date | major incident, security event | every time the activity is done |
| Example | restore a backup | online shop outage | check incoming goods |
In practice the lines blur. Google, for example, calls the guides its on-call engineers use when responding to a page playbooks. What matters is not the word but whether someone else can do the task from the document. For procedures outside IT, see our SOP examples, and for a whole workflow with roles and handoffs, see the guide to process documentation.
What to include in a runbook
AWS lists what a runbook should contain at a minimum: the desired outcome, the necessary tools and permissions, detailed guidance on error handling and escalation, and the runbook owner. It should be published in a central location. That gives you a simple runbook template:
| Field | What to write |
|---|---|
| Title and ID | Short name of the task, for example RB 004 Renew certificate |
| Purpose and outcome | What the runbook is for and how you know the job is done |
| Trigger | Which alert, symptom or date leads here |
| Tools and permissions | Which access, roles and programs are needed and where the credentials are stored (never the passwords themselves) |
| Steps | Numbered steps, one action per step with the expected result |
| Verification | How to check that the system works again |
| Error handling | What to do if a step fails and when to stop |
| Escalation | Who to call if you are stuck, with a backup contact |
| Owner and last review | Who maintains the runbook and when it was last checked |
Runbook example: an expiring certificate
The following example is made up and deliberately generic. It shows how specific a runbook should be without depending on a particular product.
- Title: RB 004 Renew the website TLS certificate
- Outcome: The website shows a valid certificate with at least 60 days left.
- Trigger: Monitoring reports that the certificate expires in less than 14 days.
- Tools and permissions: account with the certificate provider, admin access to the web server, both in the password manager folder Website.
- Read the expiry date in the browser or the monitoring check and note it in the ticket.
- Request a new certificate for the same domains from the provider.
- Complete the domain validation the way the provider requires.
- Place the certificate and key on the web server in the documented location.
- Reload the web server instead of restarting it, so no connections drop.
- Verify: open the website in a private window and check the new expiry date.
- Close the ticket and add the next expiry date to the team calendar.
Error handling: if domain validation fails, do not retry again and again; check the DNS records and escalate. Escalation: first the runbook owner, then the backup, both with phone numbers.
How to write a runbook in 6 steps
1. Start with short, frequent tasks
AWS recommends starting with runbooks that are short and frequently used. List the tasks and incidents of the last few months with your team: what kept coming back, and where did the same person have to help every time? That list is your plan.
2. Ask the person who does it today
The knowledge for a runbook usually sits in one head. Have the task shown or explained to you and ask follow up questions: how do you know it worked? What has gone wrong before? What do you do when the usual way fails? These exceptions are what gets lost otherwise. If only one person can do a task, your team has a bus factor of 1 there.
3. Write for someone else
Write so that a colleague with basic knowledge can do the task alone at night. One step per line, a verb at the start, the expected result next to it. Copy error messages word for word so they can be recognised. Wikipedia names error messages with what to do about them, and flowcharts, as typical additions.
4. Have someone else test it
According to AWS, you validate a finished runbook by having someone else on your team run it. Wherever they hesitate or ask, something is missing. The author only watches and takes notes.
5. Store it centrally, with an owner and a date
A runbook nobody can find does not help during an incident. Keep all runbooks in one place the team can reach even during an outage. Every runbook gets an owner and the date of its last review.
6. Keep it current, then automate
AWS lists runbooks that drift out of sync with system changes as a common anti pattern. Review a runbook with every change to the system and after every use. Once a runbook is stable, you can replace single steps with scripts. PagerDuty distinguishes manual, semi automated and fully automated runbooks. A fully automated runbook is what Azure Automation means by the word.
Why runbooks are worth it
AWS names the benefits: fewer errors in manual tasks, operations performed in a consistent way, and new team members who can start performing tasks sooner.
In the Site Reliability Engineering book, Google writes that thinking through and recording the best practices ahead of time produces roughly a 3x improvement in mean time to repair compared with winging it. The same paragraph adds the caveat: no playbook, however comprehensive, is a substitute for smart engineers who can think on the fly.
Where runbooks fall short
A runbook describes the known path. It says little about why the system was built this way, which shortcut once went wrong, which vendor actually helps with which problem, or what a particular warning means in this one system. That experience often stays with the person who has looked after the system for years. Much of it is tribal knowledge: never held back on purpose, just never asked for.
This becomes obvious when exactly that person leaves. There are often a few runbooks for the frequent tasks, but no answer to how everything fits together. To keep the business running during a longer outage, a business continuity plan helps. To prepare for a key person leaving, start with succession planning.
Conclusion
A runbook is the written procedure for a recurring task or a known problem in IT operations, written for someone other than its author. It states the goal, the trigger, tools and permissions, steps, verification, error handling, escalation and an owner. Start with short, frequent tasks, have someone else test every runbook, keep them all in a place you can reach during an outage and update them with every change. And write them while the person who knows the system is still there.
Frequently asked questions
- What is a runbook in simple terms?
- A runbook is a step by step guide for a recurring task or a known problem in IT operations. It is written so that someone else can do the task without asking the person who knows the system.
- What is the difference between a runbook and a playbook?
- A runbook covers a single task, such as restoring a backup. A playbook covers how the team responds to a larger event, with roles and workflows, and can include several runbooks.
- Is a runbook the same as an SOP?
- Both are step by step procedures. Runbook is the term used in IT operations, mostly for technical tasks and incidents. SOP is used for activities across the whole company, for example in the warehouse, the office or production.
- What is a runbook in Azure?
- In Azure Automation, a runbook is a script, for example in PowerShell or Python, or a graphically built workflow that the service runs. That is a fully automated runbook. The written guide for people is often the first stage of it.
- How often should a runbook be updated?
- With every change to the system, after every use where something did not match, and otherwise on a fixed schedule. A field with the last review date and an owner shows whether a runbook can still be trusted.