healthchecks.io is a service that performs health checks on Docker containers.

submited by
Style Pass
2021-05-16 09:52:51

I'm currently in the midst of improving the monitoring of my infrastructure. I make heavy use of docker and docker-compose for my hosting, so it's vital to add monitoring for most of the containers.

I'm hosting my own instance of healthchecks.io. Their solution to monitoring involves you having to ping them, instead of the other way around. This let's you add healthchecks to virtually anything that can ping a http-endpoint.

docker-compose let's you define healthchecks to your config that, when completing sucessfully, mark the container as "healthy". The process of adding such a healthcheck is simple. First, create a new check in your healthchecks.io account and set the ping interval to 1 minute, or a value you prefer. Then, add this snippet to your docker-compose file:

Change the first url to the url of your app. The second URL is the endpoint of your healthchecks.io instance. You can obtain it from the check you configured earlier.

Leave a Comment