-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] Docker container health check #381
Comments
This is a great idea, and for some reason I thought it was already implemented but I took a look at the If you'd be willing to open a PR, I'd be happy to merge it. |
Unfortunately, I'm not familiar with Go, so I can't improve the health endpoint. I'll make a PR for the health check itself later today. 😀 |
the healthcheck endpoint has now been updated to validate sqlite and influxdb status. I havent added the HEALTHCHECK instructions to the Dockerfiles yet though. |
So I have added a healthcheck section to my docker compose file for Scrutiny Web in the form of
and similarly for InfluxDB. Is there something that makes sense that I could add as a healthcheck for the collector container? |
thats great @joe-eklund I'll try to integrate your change into the Dockerfiles. Regarding a healthcheck for the collector, we'd probably just want to validate that the cron daemon is running. If you'd be willing to look into that, it'd be appreciated! |
Is your feature request related to a problem? Please describe.
Nope, no problems. Just a pretty useful simple thing that can help when troubleshooting or monitoring container status. Docker has container health checking system: official docs. And since the docs are pretty technical, here's a random article I found about it, in case anyone reading is not familiar: Medium article.
In a nutshell, it allows for native Docker monitoring of container status - for example, if the Scrutiny web service errors out, but it keeps running, the container will still show as "up, running". If HEALTHCHECK is implemented, it will show as "unhealthy", which allows users to notice really quick something is wrong when looking at
docker ps
or Portainer/alternative GUI.Describe the solution you'd like
Implement HEALTHCHECK in the Dockerfile. It's pretty darn simple, I can implement it and PR if you want, but I'm not familiar with Scrutiny architecture - I'm just a user for now ;) - so it might be better that someone who worked on Scrutiny before adds it, so it accounts for all possible cases of failure (including InfluxDB failing, API failing etc.).
The text was updated successfully, but these errors were encountered: