Skip to main content
Shows the status of every Nanny component that is currently active. Exits 0 if all active components are healthy, 1 if any are unhealthy.

What it checks

nanny health checks two things: Something that was never started is not checked and does not cause a non-zero exit. nanny health only reports on what is active. nanny run injects NANNY_BRIDGE_ADDR into the process it launches, so this answers from inside a governed process. Run from a plain terminal there is nothing to find, which is not a failure.

Example output

Inside a governed process:
Governor unreachable:
Exit code is 1 when any active component is unreachable.

Certificate expiry warning

When certs exist and are valid but expire within 30 days, nanny health prints a warning to stderr:
The exit code is still 0, a near-expiry cert is healthy, just worth knowing about.

Use in scripts and health checks

nanny health is designed for scripts, Docker health checks, and Kubernetes liveness probes: Docker:
Shell script:
Kubernetes:

See also