Notes by Doctor Droid

What is a PlayBook and what is core components of a playbook?

·

2 min read

This guide explains the concept of a playbook and its core components.

Cover Image for What is a PlayBook and what is  core components of a playbook?

A playbook is a set of instructions that a Doctor Droid bot or an on-call engineer follows during a production incident.

A playbook consists of tasks. A task is an instruction that's executed through the portal. Let's create a task.

A task could involve fetching a metric from CloudWatch or running a kubectl command on a server. Let's create a new task to fetch logs from CloudWatch.

Add notes to the playbook. A note is a custom guideline for the user, related to the playbook or a specific step. Add a note indicating that this task fetches logs.

Hover over a step to view the note. It's also possible to add multiple tasks in a step. For instance, fetch a Datadog metric. After adding the task, check the metric.

Add variables to the playbook. For example, add a service as a variable. To use the variable, enter a dollar sign followed by the variable name.

Add a step with conditions. A condition is a rule that determines whether a certain action should be taken. For example, check logs from CloudWatch and check if the row count equals six. Then add a task. Add a metric and run the task.

Save the playbook. Execute the playbook and observe the results with the condition. If the condition isn't met, the step isn't recommended and the next step is executed.

These are all the core components of a playbook.