In a serious incident, the technical fix is often the easy part; coordinating people is hard. Incident command gives an incident a structure: one incident commander who coordinates and decides, an operations lead who directs the technical work, a communications lead who keeps everyone else informed, and a scribe. Communication follows a rhythm: internal updates on a schedule, a status page for customers with honest, plain updates. Afterwards, a blameless postmortem finds the contributing causes and turns them into tracked actions. This lesson follows one major incident, and shows two failures: everyone debugging and nobody coordinating, and a status page that stayed green while customers could not pay.
Difficulty: Advanced · Know this first: Lesson 219, Lesson 211
By the end of this lesson you can work at four levels:
This page teaches it with a plain-language analogy, an animated diagram with normal and failure scenarios, a simulator, a quiz, basic, intermediate, advanced, and master checks, the expert detail ("Go deeper"), a production incident, a hands-on lab with commands and their output, and a production design exercise.
This bar adds up minutes from the first alert to resolution. It is a worked example, not a measurement. The commander and status page hops decide whether a fixable incident stays small.
Pick how the incident is coordinated, who talks to customers, and how the postmortem is done.
Three questions. No score is saved anywhere — this is just you against the material.
Incident response grows in four levels: responding well, leading incidents, communicating, and learning across the organisation.
At the basic level you can join an incident and help without adding noise.
Where it breaks: making a production change without telling the IC.
Try it: Basic
You think restarting the database would help. What do you do?
Now do it: Read your incident process's change rules.
At the intermediate level you can be the incident commander.
Try it: Intermediate
You are IC and the team wants to keep debugging the root cause while customers are failing. What do you decide?
Now do it: Practise as IC in a game day.
At the advanced level communication runs as well as the technical work.
Try it: Advanced
Why host the status page separately from the product?
Now do it: Check where your status page is hosted.
At the master level incidents improve the whole organisation.
Trade-off: process adds overhead to small incidents; scale it by severity, so SEV3s stay light.
Try it: Master
Half of last year's postmortem actions were never done. What do you change?
Now do it: Count your open postmortem actions.
Severity definitions and what each triggers:
SEV1 core function down or data at risk for many customers
IC + ops lead + comms lead + scribe; internal updates every 30 min; status page within 15 min;
postmortem required within 5 working days
SEV2 significant degradation or a core function down for some customers
IC + responders; updates every 60 min; status page if customers notice; postmortem required
SEV3 minor or internal impact
owner team handles; summary in the channel; postmortem optional
A status page update, written for customers:
Investigating — 14:12 UTC Some card payments are failing at checkout. Other payment methods and browsing are working. We are investigating and will update by 14:45 UTC. Resolved — 15:10 UTC Card payments have been working normally since 14:38 UTC. Between 13:58 and 14:38, about 30% of card payments failed and were not charged. We will publish a summary of what happened.
A postmortem outline: summary; impact (who, how many, how long); timeline (from the scribe's notes); contributing factors (technical, process, information); what went well; where we got lucky; actions (each with owner, due date, and tracking link). Google's SRE book chapter on postmortem culture and the incident command chapters are good references.
This is a composite of a failure pattern that keeps repeating; the details are illustrative. Twenty-three people and no commander.
An IC rota for SEV1s, a checklist that names IC, ops lead, comms lead, and scribe in the first 10 minutes, a rule that production changes during an incident go through the ops lead, and a canary for payment configuration.
Everything here runs on any Linux machine: your own laptop, WSL on Windows (run wsl --install in PowerShell once), or a small cloud VM. The Python needs only Python 3 and its standard library; check that you have it with python3 --version.
Before you start: Linux and Python 3. The steps build an incident timeline from logs, the way a scribe and a postmortem author would.
Type each one, read what it prints, and compare it with the note above it.
Make a small incident log: alerts, changes, decisions, and updates with timestamps.
mkdir -p ~/labs/incident && cd ~/labs/incident cat > timeline.log <<'EOF' 13:58 ALERT payments 5xx 31% 14:02 DECLARE SEV1 by on-call (alice) 14:06 ROLE IC: bob; ops: carol; comms: dan; scribe: erin 14:12 STATUS public: some card payments failing, investigating 14:20 CHANGE carol: roll back payments config v88 -> v87 (approved by IC) 14:28 SIGNAL 5xx back to 0.4% 14:40 STATUS public: fix applied, monitoring 14:56 RESOLVE IC: normal for 25 minutes EOF cat timeline.log
Compute the key durations: time to declare, to mitigate, and to resolve.
awk '{split($1,t,":"); m=t[1]*60+t[2]} NR==1 {start=m} /DECLARE/ {d=m} /SIGNAL/ {mit=m} /RESOLVE/ {r=m} END {printf "declare %d min, mitigate %d min, resolve %d min\n", d-start, mit-start, r-start}' timeline.logCheck that every production change was announced and approved.
grep CHANGE timeline.log | grep -v "approved by IC" && echo "UNAPPROVED CHANGE FOUND" || echo "all changes approved"
postmortem.pyThis program checks an incident record the way a postmortem review would: whether roles were named in time, whether customers were told within the target, and whether production changes went through the incident commander. Then it tracks postmortem actions across past incidents and finds the themes that keep recurring. Save it as postmortem.py, then run it.
# postmortem.py
EVENTS = [(0, "alert"), (4, "declare"), (8, "role:ic"), (8, "role:ops"), (22, "change:by-ops"),
(35, "change:by-db-team"), (50, "status:public"), (58, "resolve")]
TARGETS = {"declare": 10, "role:ic": 10, "status:public": 15}
first = {}
for t, e in EVENTS:
first.setdefault(e, t)
for event, target in TARGETS.items():
t = first.get(event)
print(f"{event:<14} at {t:>3} min target {target:>2} {'ok' if t is not None and t <= target else 'MISSED'}")
rogue = [t for t, e in EVENTS if e.startswith("change:") and e != "change:by-ops"]
print("changes outside the ops lead:", rogue or "none")
print()
ACTIONS = [ # (incident, theme, done?)
("INC-2101", "deploy safety", True), ("INC-2101", "alert routing", False), ("INC-2144", "deploy safety", False),
("INC-2144", "status page", True), ("INC-2203", "deploy safety", False), ("INC-2203", "capacity", True),
("INC-2291", "status page", False), ("INC-2291", "deploy safety", False), ("INC-2291", "incident roles", True),
]
done = sum(1 for _, _, d in ACTIONS if d)
print(f"postmortem actions completed: {done}/{len(ACTIONS)}")
themes = {}
for _, theme, d in ACTIONS:
total, open_ = themes.get(theme, (0, 0))
themes[theme] = (total + 1, open_ + (not d))
for theme, (total, open_) in sorted(themes.items(), key=lambda kv: -kv[1][0]):
print(f" {theme:<15} in {total} postmortems, {open_} still open")
Run it, and you should see this output:
$ python3 postmortem.py declare at 4 min target 10 ok role:ic at 8 min target 10 ok status:public at 50 min target 15 MISSED changes outside the ops lead: [35] postmortem actions completed: 4/9 deploy safety in 4 postmortems, 3 still open status page in 2 postmortems, 1 still open alert routing in 1 postmortems, 1 still open capacity in 1 postmortems, 0 still open incident roles in 1 postmortems, 0 still open
The same Linux steps, made into a real script you can keep and run again. It uses the Bash features a production script needs: functions (one per step), an array of step names, arguments to choose steps, a case for options, exit codes recorded for each step, and a trap that prints a summary even when you stop it with Ctrl+C. Make a folder for this lesson (mkdir -p ~/labs/incident-command-communications-and-postmortems && cd ~/labs/incident-command-communications-and-postmortems) and save this as lab.sh.
#!/usr/bin/env bash
# The Linux steps of "Incident Command, Communications, Status Pages, and Postmortems", as one script (save it as lab.sh).
#
# ./lab.sh run every step, in order
# ./lab.sh 2 4 run only steps 2 and 4
# ./lab.sh --list list the steps
#
# The steps share one shell, so a later step can use what an earlier one set up (a folder,
# a variable, a container): run them all in order the first time. Your own scripts should
# start with "set -euo pipefail"; this one runs teaching commands, and some of them fail on
# purpose, so it records each step's exit code instead of stopping at the first failure.
STEPS=(
'Make a small incident log: alerts, changes, decisions, and updates with timestamps.'
'Compute the key durations: time to declare, to mitigate, and to resolve.'
'Check that every production change was announced and approved.'
)
step_1() {
mkdir -p ~/labs/incident && cd ~/labs/incident
cat > timeline.log <<'EOF'
13:58 ALERT payments 5xx 31%
14:02 DECLARE SEV1 by on-call (alice)
14:06 ROLE IC: bob; ops: carol; comms: dan; scribe: erin
14:12 STATUS public: some card payments failing, investigating
14:20 CHANGE carol: roll back payments config v88 -> v87 (approved by IC)
14:28 SIGNAL 5xx back to 0.4%
14:40 STATUS public: fix applied, monitoring
14:56 RESOLVE IC: normal for 25 minutes
EOF
cat timeline.log
}
step_2() {
awk '{split($1,t,":"); m=t[1]*60+t[2]} NR==1 {start=m} /DECLARE/ {d=m} /SIGNAL/ {mit=m} /RESOLVE/ {r=m} END {printf "declare %d min, mitigate %d min, resolve %d min\n", d-start, mit-start, r-start}' timeline.log
}
step_3() {
grep CHANGE timeline.log | grep -v "approved by IC" && echo "UNAPPROVED CHANGE FOUND" || echo "all changes approved"
}
# print a step that has to be run by hand, instead of running it
by_hand() {
echo " (run this one yourself: $1)"
sed 's/^/ /'
}
RESULTS=()
run_step() {
local n=$1 start=$SECONDS code
printf '\n== step %d of %d: %s\n' "$n" "${#STEPS[@]}" "${STEPS[n-1]}"
"step_$n"
code=$?
RESULTS+=("step $n: exit code $code, $((SECONDS - start)) s")
}
summary() {
echo
echo "== summary"
local r
for r in "${RESULTS[@]}"; do echo " $r"; done
}
case "${1:-}" in
-h|--help) sed -n '2,6p' "$0"; exit 0 ;;
--list) for i in "${!STEPS[@]}"; do echo "$((i + 1)). ${STEPS[i]}"; done; exit 0 ;;
esac
[ $# -eq 0 ] && set -- $(seq 1 "${#STEPS[@]}")
for n in "$@"; do
if ! [[ $n =~ ^[0-9]+$ ]] || (( n < 1 || n > ${#STEPS[@]} )); then
echo "there is no step '$n'; try --list" >&2
exit 2
fi
done
trap summary EXIT
trap 'echo; echo "stopped with Ctrl+C"; exit 130' INT
for n in "$@"; do run_step "$n"; done
Then make it executable and run it:
chmod +x lab.sh ./lab.sh --list # the steps ./lab.sh # every step, then a summary of exit codes and times ./lab.sh 2 3 # only steps 2 and 3
New to a feature used above? These W3Schools pages explain each one from zero, with examples you can run in the browser.
grep, awk, mkdir, cat, echo, cd, Pipes, Redirection, If...Else, Here documents, Variables.Your company has had three SEV1s this quarter, each with confused coordination and late customer communication. Design its incident command process.
How are incidents declared and graded? Who can be IC, and how are they trained? Which roles exist at each severity? How do internal updates and the status page work? How are postmortems run, and how are actions tracked? How do you practise?
Say 40 engineers on call across 8 teams, about 2 SEV1s and 8 SEV2s a quarter, and 60,000 business customers.
Severity definitions by customer impact; anyone can declare in chat, which creates the channel, call, pinned summary, and paging of the IC rota; a trained IC rota of 10; roles assigned in the first 10 minutes for SEV1/2; production changes only through the ops lead; internal updates every 30 or 60 minutes from templates; a status page on separate infrastructure owned by the comms lead, first update within 15 minutes; blameless postmortems within 5 working days with actions in team backlogs, reviewed monthly; quarterly game days for IC practice.
Formal roles feel heavy for small incidents, so SEV3 stays light; early public updates sometimes report problems that turn out minor, which is better than silence; postmortem time competes with roadmap work, so limit actions to the few that matter.
Each row is one way this system went wrong in the diagram's scenarios. The hop number is where to look first.
| Scenario | Where | Effect | What goes wrong |
|---|---|---|---|
| No incident commander | Hop 2: Incident commander | Breaks | Nobody takes command. Twenty-three people join a call. The payments team rolls back a deploy while the database team, seeing connection errors, restarts the primary; the restart causes a failover that undoes part of the rollback's effect and adds new errors. |
| Silent status page | Hop 7: Status page | Breaks | Nobody owns customer communication; the status page stays "All systems operational". Customers post screenshots of failed payments on social media and open 4,200 support tickets. |
The official documentation and standards behind this lesson. Versions and defaults change; when a command or field here differs from them, trust the official page.
Last updated . Next review due by November 2027. Found something out of date? Tell me.