Docker events and incident timelines
Worked example
This is an offline lesson. Data are fictional and Docker commands are unexecuted. Any optional execution requires an authorized disposable VM, a verified context, synthetic data, restricted access and no external transmission. Do not collect secrets or private output. Before any authorized optional observation, verify the effective daemon endpoint including overrides, exact object ID and observation window. Bound collection time and output bytes; do not generate resource pressure or export private telemetry. Mark unavailable measurements NOT RUN.
# Staged command for an approved context and lab namedocker events --since 10m --until 0s --filter type=container --filter container=bm-observe# Fictional timeline (UTC, not captured output)10:00:00 start container=demo-A10:00:25 health_status container=demo-A status=healthy10:02:10 health_status container=demo-A status=unhealthy10:03:00 die container=demo-A exit=110:03:10 start container=demo-AFilters select object type and container; the end time bounds the query instead of leaving a continuous stream. For historical incidents use explicit RFC3339 timestamps with offsets. Docker retains only a limited recent event history (the CLI docs specify the last 256 events), so an empty result may mean the interval was lost or the filter missed it. Compare the same container ID, context and UTC clock with application logs and resource data. Here unhealthy precedes die, but that does not prove the health check caused the exit. A long-term collector should handle reconnection, bounded storage, duplicates, access control and missing periods. Preserve redacted evidence before a replacement removes it. The fictional timeline uses demo-A whereas the staged filter uses bm-observe; these are separate examples, not evidence that the command returned the timeline. For an authorized real query bind the filter to the verified object identity and specify an absolute time range. The 50-second gap is temporal evidence only.
Common mistake
Temporal order is not causation. Events can establish that a state changed without identifying the application bug.
Manual practice
Calculate elapsed time from unhealthy to die. Identify one hypothesis and one independent piece of evidence needed to test it; explain why querying a busy daemon hours later can miss events.
Worksheet: lab-fixtures/docker-observability/05-events/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Docker events and incident timelines — Knowledge check
Interpret synthetic observability evidence and choose safe diagnostic actions.
How much time elapsed from unhealthy to die?
Why might a historical events query return nothing?
What can the ordering unhealthy then die establish?