Monitor Containers for Health checks, and send SLACK messages when is down.
10K+
Monitor Containers for Health checks, and send Slack Notifications, when Containers Run Into Problems/down.
Start a container in the target docker host.
This container will query status for all containers.
curl -XGET --unix-socket /var/run/docker.sock http://localhost/containers/json
Send slack notifications, we get matched of "unhealthy"
NOTE: This image is based on Python Alpine image, and scanned for vulnerabilities with anchore.io
Create a .env file and a docker-compose.yml file, put both on the same directory.
SLACK_CHANNEL=XXX
SLACK_USERNAME=XXX
SLACK_TOKEN=xoxp-XXX-XXX-XXX-XXXXXXXX
MSG_PREFIX=Monitoring On XX.XX.XX.XX
version: '3'
services:
monit-slack:
container_name: monitslack
restart: always
image: xanubi/monit-slack:latest
environment:
SLACK_CHANNEL: ${SLACK_CHANNEL}
SLACK_USERNAME: ${SLACK_USERNAME}
SLACK_TOKEN: ${SLACK_TOKEN}
MSG_PREFIX: ${MSG_PREFIX}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
This image is continuous scanned by Anchor.io, for security bugs. You can check it at anchore.io : https://goo.gl/ZhQRra
And that's it. You can add this to your docker composer file of your project, and your containers are health checked.
Content type
Image
Digest
Size
36.5 MB
Last updated
over 8 years ago
docker pull xanubi/monit-slack