7 Tools for Running Container Healthchecks and Restart Policies
Seven tools for running container healthchecks and restart policies, from Docker and Kubernetes to Monit and Uptime Kuma.
On this page
Key takeaways
- A healthcheck tells the platform whether a container is actually working.
- Restart policies decide what happens when a container exits.
- Liveness and readiness answer two different questions.
- Automatic restart covers crashes, while checks cover silent stalls.
Quick comparison
| Tool | Best for | Starting price | Free plan |
|---|---|---|---|
| Docker | Container healthchecks | Not included | Not included |
| containerd | Runtime-level supervision | Not included | Not included |
| Kubernetes | Liveness and readiness probes | Not included | Not included |
| Healthchecks.io | Job and service heartbeats | Not included | Not included |
| Monit | Host service supervision | Not included | Not included |
| Supervisord | Process supervision | Not included | Not included |
| Uptime Kuma | External health checks | Not included | Not included |
The best tools for running container healthchecks and restart policies
1. Docker
- Official site: https://www.docker.com/
- Best for: Container healthchecks
- Starting price: Not included
- Free plan: Not included
- Pros: Built in; simple
- Cons: Single host focus
Docker can run a healthcheck command inside a container and mark it healthy or unhealthy based on the result. A restart policy then decides whether to restart a container that exits. The two settings are declared in the image or the run command.
The built-in healthcheck is the first line of defense, since the platform can tell the difference between a running process and a working service. The restart policy then handles the exit case without a person.
2. containerd
- Official site: https://containerd.io/
- Best for: Runtime-level supervision
- Starting price: Not included
- Free plan: Not included
- Pros: Core runtime; lightweight
- Cons: Lower-level tool
containerd runs containers and tracks their state, and higher-level tools build their healthcheck and restart logic on top of it. Its task model reports when a container stops or fails. It is the foundation most modern runtimes share.
The runtime-level state is what every healthcheck ultimately reads. containerd keeps that state accurate and available to the platforms above it, so their checks have something to work with.
3. Kubernetes
- Official site: https://kubernetes.io/
- Best for: Liveness and readiness probes
- Starting price: Not included
- Free plan: Not included
- Pros: Probes; restart control
- Cons: Cluster complexity
Kubernetes runs liveness and readiness probes against pods and restarts containers that fail the liveness check. The readiness probe controls when traffic is sent, so a starting or degraded pod is not hit. The probes are part of the pod specification.
The two probes answer the two questions a healthcheck must separate: is the process alive, and is it ready to serve. Kubernetes restarts on the first and withholds traffic on the second, so a pod that is merely slow to start is not killed for the wrong reason.
4. Healthchecks.io
- Official site: https://healthchecks.io/
- Best for: Job and service heartbeats
- Starting price: Not included
- Free plan: Not included
- Pros: Simple; self-hostable
- Cons: Heartbeat focused
Healthchecks.io expects a heartbeat from a service at an interval and alerts when it is missed. A container can ping the service as part of its own health routine. The heartbeat catches a silent stall that a process check would miss.
The heartbeat model adds a check that goes beyond whether the process is running. A container that is up but no longer doing its work is caught by the missing ping.
5. Monit
- Official site: https://mmonit.com/monit/
- Best for: Host service supervision
- Starting price: Not included
- Free plan: Not included
- Pros: Restarts; simple config
- Cons: Single host focus
Monit watches processes on a host and can restart them when they fail, including container runtimes and the services they run. It can also alert on resource use and missing files. The supervision is local and dependable.
For a single host, Monit adds a restart layer under or beside the container runtime. It catches failures the platform might miss and brings the service back quickly. The restart and the alert happen together, so the team knows both that it failed and that it recovered.
6. Supervisord
- Official site: https://supervisord.org/
- Best for: Process supervision
- Starting price: Not included
- Free plan: Not included
- Pros: Restarts; logs
- Cons: Process focused
Supervisord supervises processes and restarts them according to policy, with log capture for each one. It is a common way to keep a service alive inside or outside a container. The restart rules are simple and explicit.
For services that run as processes rather than full containers, Supervisord provides the restart behavior a healthcheck alone cannot. It pairs the restart with the logs needed to see why it happened.
7. Uptime Kuma
- Official site: https://uptime.kuma.pet/
- Best for: External health checks
- Starting price: Not included
- Free plan: Not included
- Pros: External probes; alerts
- Cons: Does not restart
Uptime Kuma checks a container's endpoint from the outside and alerts when it is down or slow. The external check sees what users see, which an internal probe can miss. It does not restart anything, but it tells the team when a restart is needed.
The external view is the complement to the platform's internal checks. Together they cover both whether the process is alive and whether the service is actually reachable.
How we chose
We looked for tools that can both check whether a container is working and restart it when it is not, since the two capabilities belong together. The list spans runtimes, orchestrators, and supervisors so a team can cover the level it runs at. Each entry separates a running process from a working service, which is the core of a good healthcheck.
We favored tools that distinguish liveness from readiness, because a service can be alive but not ready, and restarting it is not the answer. The right action depends on which state is failing. That distinction is what keeps restarts from making a bad situation worse.
We also valued the external check, since an internal probe cannot see the network path a user takes. The combination of an internal healthcheck and an external probe covers both the process and the experience. The best setup uses both.
FAQ
What is the difference between liveness and readiness?
Liveness asks whether the process is alive and should be restarted if not. Readiness asks whether the service is ready to handle traffic, so it can be withheld without a restart. Mixing them up causes unnecessary restarts or traffic to broken instances.
What should a healthcheck actually check?
Something that proves the service is doing its work, such as a query or a known endpoint, not just that a port is open. A port can be open while the service is stuck. The check should fail when the service cannot do its job.
When should a container be restarted automatically?
When it exits unexpectedly or fails its liveness check. Restart policies handle crashes, while a healthcheck handles a running but broken process. The two together cover the common failure modes.
Can a healthcheck catch a silent stall?
A process-level check may not, but a heartbeat or an endpoint check that performs real work can. The check must exercise the service, not just observe it. That is the difference between a liveness probe and a real healthcheck.
Why keep an external check if the platform restarts?
Because the platform sees the process, while the external check sees the service from a user's viewpoint. Problems in networking or configuration can leave the process healthy but the service unreachable. The external check is the one that catches that gap.