Health status versus process state
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 read-only inspection (approved context only)docker inspect --format '{{json .State.Health}}' bm-observe# Fictional records, not actual inspect output:A: running=true, health=startingB: running=true, health=unhealthy, consecutive failed probes=3C: running=true, health=not configuredD: running=false, exit=1Use a cheap probe with explicit timeout, interval, retries and startup allowance, based on the actual service contract. A probe exits 0 for success or 1 for failure; exit 2 is reserved. The startup grace period lets initial failures avoid counting toward retries; a successful probe can end the startup grace behavior. A healthy probe is not necessarily a user-facing availability check: a local endpoint may pass even when external routing is broken. Use inspect to review recent probe output; keep its message short and free of secrets. In standalone Docker, an unhealthy status alone does not trigger a restart policy; policies respond to process exits under their documented conditions. A health-aware orchestrator may act differently. In B, investigate the probe and application before considering a scoped change. Three failures establish unhealthy only under the effective probe settings and startup rules. Here the status is given as fictional evidence, not inferred from a universal retry count. Compare probe timestamp and result to an independent authorized user-path test. No configured probe means no health evidence, not a healthy result.
Common mistake
Do not interpret starting as a confirmed outage or healthy as proof that all dependencies and user routes work.
Manual practice
Classify A–D as process-state evidence or probe evidence. For B, propose one read-only next step and one separate user-facing check.
Worksheet: lab-fixtures/docker-observability/03-health/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Health status versus process state — Knowledge check
Interpret synthetic observability evidence and choose safe diagnostic actions.
What does running=true, health=unhealthy establish?
What normally triggers a standalone Docker restart policy?
What is useful after a healthy local probe but a failed external request?