Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ByteArena/docker-healthcheck-watcher
Monitor container healthchecks :robot:
https://github.com/ByteArena/docker-healthcheck-watcher
docker healthcheck
Last synced: about 1 month ago
JSON representation
Monitor container healthchecks :robot:
- Host: GitHub
- URL: https://github.com/ByteArena/docker-healthcheck-watcher
- Owner: ByteArena
- Created: 2017-06-23T14:25:38.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-19T12:09:15.000Z (about 5 years ago)
- Last Synced: 2024-07-02T14:46:41.114Z (5 months ago)
- Topics: docker, healthcheck
- Language: Go
- Homepage:
- Size: 39.1 KB
- Stars: 16
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - docker-healthcheck-watcher - Monitor container healthchecks :robot: (Go)
README
# docker-healthcheck-watcher
> Monitor container healthchecks
### The issue
If you are using a micro-service oriented architecture and you want to make sure all your services are up and running, you need some sort of application healthchecks.
Usually each service must expose an HTTP interface (something like `/health`). In a web application it's easy, you can just create a new route responding to the healthcheck but how would you do for system binaries for example?
### The solution
You can specify a `HEALTHCHECK` instruction in your Dockerfile. Docker will be executing the command at a regular time (interval and timeout are configurable).
Almost no monitoring/alerting tool uses that Docker feature, so we decided to build our own.The healthcheck doesn't pass the boundaries of the container, there is no security or disclosure issue. Even for non HTTP service likes batches you can provide a custom command (bash script) to check the health of your program.
If Docker detects an unhealthy service, it will send a message to our tool and we can decide what to do (see integrations).
### Integrations
At the moment only Slack is supported for alerting. The configuration (environment variables) is the following:
```yml
# Slack endpoint with the authentication token
SLACK_URL: "https://hooks.slack.com/services/[...]"# Channel, private group, or IM channel to send message to.
SLACK_CHANNEL: "#ops"# Set your bot's user name.
SLACK_USERNAME: "dockerwatcher"# Emoji to use as the icon for this message
SLACK_ICONEMOJI: ":robot_face:"
```### Build and run
The binary is in the `cmd/daemon` folder.
Build:
```sh
go build
```And run the daemon:
```sh
./daemon
```