Skip to content

Commit

Permalink
Merge pull request #325 from balena-io-modules/vipulgupta2048/healthc…
Browse files Browse the repository at this point in the history
…heck

patch: Document a way to surface healthchecks to dashboard
  • Loading branch information
flowzone-app[bot] authored Mar 21, 2024
2 parents fbd82e8 + f531958 commit c1b60a0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,16 @@ restrictive local network, or an unreliable connection.
#### Summary

Any checks with names beginning with `check_service_` come from user-defined services.
These checks interrogate the engine to see if any services are restarting uncleanly/unexpectedly or failing health checks.
We allow users to provide their own health checks using the [HEALTHCHECK directive](https://docs.docker.com/engine/reference/builder/#healthcheck)
defined in the Dockerfile or docker-compose file.
Any health check output will be collected as-is, truncated to 100 characters, and shown as output along with the exit code.
These checks query the engine to see if any services are restarting uncleanly/unexpectedly.

#### Building & Surfacing your own healthchecks in the dashboard

We allow users to provide their own health checks using the [HEALTHCHECK directive](https://docs.docker.com/engine/reference/builder/#healthcheck) defined in the Dockerfile or docker-compose file. With healthchecks, you can test a container to check that it's still working and healthy.

Any health check output will be collected as-is, truncated to 100 characters, and shown as output along with the exit code. The result of the health check will be available in the dashboard in the `Diagnostics` page under the `Device health checks` tab.

Here's a [working example](https://github.com/balena-io-examples/healthcheck-publicurl) of how **HEALTHCHECK directive** works in a balenaCloud dashboard demo.


#### Triage

Expand Down

0 comments on commit c1b60a0

Please sign in to comment.