735 words
4 minutes

07 from Docker Health Checks That Cannot Fail — Seventeen Hours Green

The red-case audit: prove every health check can fail

By Docker Captain · CNCF Ambassador · IBM Champion
Cable plugged into itself, red lamp lit, Docker health check Blueprint 07

Monitoring is written to detect failure and tested by watching it not fire. That is the whole defect.

A dashboard of green checks cannot tell a working check from one that has no red state, so the audit asks each check to fail, on purpose, once.

  1. 1

    Run every check against a case it must fail

    Inside the container, pgrep -f missing should exit 1; exit 0 means the check matches its own shell. Then stop the real process and watch the check go red, within the interval and retries it is given.

  2. 2

    Break the self-match, and name what serves

    Bracket one character, pgrep -f "[n]ame", and match the binary that serves, not the supervisor that starts first. Better still, ask the service itself: its own query or its health endpoint.

  3. 3

    Keep an error apart from an empty answer

    Never send a probe's stderr to /dev/null. A command that failed must give a different value from “found nothing”.

  4. 4

    Compare versions as versions

    sort -V, never !=: GitHub's latest release is the newest created, not the highest.

  5. 5

    Give the label a consumer

    Docker leaves an unhealthy container running, a restart policy included. Something has to read the state and act, and that path needs its own red test.

  6. 6

    Find the checks that never fired

    Break a conforming case on purpose for every rule that has been silent since it shipped, and compare the timers against their units: a timer whose service was deleted never shows up in systemctl --failed.

The checks that lie, by failure mode

Failure modeWhat it looks likeWhat settles it
Self-matching patternGreen over a dead processRun the check against a pattern that cannot exist
Passes too earlyGreen before the binary is on diskName the binary, not the supervisor
Silenced stderr“Nothing changed” from a command that erroredMake failure a different value from “found nothing”
Wrong comparisonCurrent repositories reported behindsort -V, never !=
Nothing reads itCorrect red state, no action takenGive the label a consumer
Guard disabled by its own failureA rule stops applying and looks like the quiet case it exists forKeep the last good reading while it is fresh, and set “do we know” explicitly
Never red, everRule silent since the day it shippedBreak a conforming case on purpose

What shows it works

A public commit, a decision, and two measurements anyone can repeat.

  • Commit b47fadd6, 5 September 2026: the self-matching check found green on an empty container, and the bracket fix measured against the same base image.
  • Decision 6, 7 September 2026: every check in the fleet ships with the test that plants its violation.
  • Measured on 13 November 2026 in alpine:3.21, each command in its own container: pgrep -f missing exits 0, and pgrep -f "[m]issing" exits 1.
  • Measured on 13 November 2026 on Docker 29.7.2: a container whose health command always fails, started with --restart unless-stopped, reports unhealthy with restarts=0.
  • The ledger, checks that lie: every finding of this kind, with the rule it produced.

Test each check alone. Inside one sh -c that also contains the word, even the bracketed pattern matches, because the shell's own command line now carries it. A red test proves the check can fail today; renaming the binary or the image can take that away, which is why the test runs on every push.

Green is the state nobody investigates.

The long version is the post Docker Health Checks That Cannot Fail. GitHub Docs, the latest release (the most recent non-prerelease, non-draft release, by creation date); procps, pgrep(1); ISMS.online on SOC 2 CC7.2 and ISO 27001 8.16.


Vladimir Mikhalev

Docker CaptainCNCF AmbassadorIBM Champion

The Verdict — production-tested analysis on YouTube.

The Verdict

Inconvenient truths about shipping in the AI era

Container security, platform engineering, and the agentic shift — tested in production, argued without the hype. The verdict reaches your inbox the moment there's one worth sending.

Related Posts

Same category
  1. 1
    Docker Health Checks That Cannot Fail — Seventeen Hours Green
    DevOps & Cloud · A Docker health check whose pattern matches the shell running it can never go red. How to find the checks in your fleet that never failed, and prove each one.
  2. 2
    DNS Exfiltration From an Air-Gapped VPC: No Route Out Is Not No Way Out
    DevOps & Cloud · DNS exfiltration needs no route. In a VPC with no internet gateway and no NAT, a pod and its node still resolved example.com, until a DNS Firewall refused it.
  3. 3
    Scheduled Workflows Fail Silently: A GitHub Actions Heartbeat for 122 Repositories
    DevOps & Cloud · GitHub Actions switches off a scheduled workflow after 60 quiet days, with no failed run and no red badge. What watches every schedule, and the watcher.
  4. 4
    Completed Is Not Restored: Kyverno Fail-Open, a Velero Restore and an HTTP 200 That Meant 500
    DevOps & Cloud · Scale Kyverno to zero and its webhooks vanish. A Velero restore said Completed over an empty disk. A 200 carried a 500. Three statuses that reported success.

More Blueprints

All 20
  1. 08
    The restore proof
    Signal, 23 September 2026 · Read the archive back, run the shipped restore script against a marker, prove the prune, and measure recovery time weekly on a machine that never ran the stack.
  2. 09
    The bounded cloud run
    Signal, 13 November 2026 · Run the real cloud test in an account of its own, tag and tear down every resource, sweep and cap what escapes, and report the cost from the bill, not the estimate.
  3. 10
    The read receipt
    Signal, 20 September 2026 · Prove the source before the prompt, open the response before trusting it, and let a verdict slow a change but never wave one through.
  4. 11
    The apply gate
    Signal, 11 June 2026 · Keep the Terraform MCP server's operations flag off, pin what it can reach, gate every agent-reachable workspace with policy, and keep the approval and its record with a person.
The red-case audit: prove every health check can fail
https://heyvaldemar.com/blueprints/red-case-audit/
Author
Vladimir Mikhalev
Published
2026-11-13
License
CC BY-NC-SA 4.0