Incident response and runbooks
Quick answer
A runbook is a repeatable, authorized operational procedure with decision points, verification and recovery steps.
Start with user impact and a known safe observation. Each runbook action should state its prerequisite, expected result and stop condition. When evidence contradicts the hypothesis, preserve it and revise the diagnosis rather than executing every recovery step mechanically.
Prepare the practice environment
Run python3 lab-fixtures/observability/setup.py from the extracted root as an ordinary user. Enter the printed fresh private path and check pwd. Use fresh fixtures, Bash with set -e -o pipefail, LC_ALL=C and umask 077. Run each snippet in a separate Bash process, not your interactive shell. Only private files are used; optional examples require an authorized snapshot VM. Do not change live monitoring or services. All supplied records are fictional. Review the lab guide.
Prerequisites
Review: Monitoring and dashboards.
How it works
For a reliability incident, first establish scope and user impact. Assign coordination, technical investigation and communication roles as appropriate. Record UTC times, observations and hypotheses separately. Use the narrowest relevant logs, metrics and listener information; compare changes with the onset, without assuming correlation proves cause. Mitigate impact using approved procedures, such as a known-good rollback if compatible with data and dependencies. Keep a recovery route, record what changed, and verify from a user-facing check rather than only process status. Escalate if authorization, rollback safety or evidence is missing. In the fictional incident the gateway emits 503 after a release, rollback occurs, and two later probes return 200. This is a training scenario, not an actual incident. Real recovery may require sustained checks across regions and endpoints.
Try the examples
The sequence narrows the investigation but cannot prove a root cause.
Expected stdout:
10:00Z release v210:01Z alert 50310:03Z rollback v110:04Z probe 20010:05Z probe 200The model counts two consecutive successful probes after rollback; more evidence is needed in production.
Expected stdout:
2 successful post-rollback probesjournalctl -u bm-report.service --since '2025-01-01 10:00:00 UTC' --until '2025-01-01 10:05:00 UTC' --no-pagerOptional authorized VM query; actual records may differ or be absent. Do not copy sensitive logs.
Manual example; not executed locally. Follow its stated environment restrictions.
Common mistakes
Do not declare recovery from a running PID alone or restart all services without evidence and approval.
Practice
Write a runbook for the fictional 503 alert: impact, scoped checks, escalation, rollback prerequisites and verification criteria.
Related references
Study: journalctl, ss. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Incident response and runbooks — Knowledge Check
Apply observability and reliability concepts to synthetic fixtures and VM-only scenarios.
What is the first useful incident question?
What must rollback consider?
What confirms recovery better?
What does temporal correlation establish?