Skip to content

leonardofalk/docker-watchdog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker-Watchdog

Triggers slack notification hooks when docker containers go up/down.

Run

In any environment you'll need some variable setup.

HOST # the host you are running this, ie.: http://ec2.amazon-host.com
SLACK_URL=https://hooks.slack.com/... # slack hook url
SLACK_CHANNEL = '#notifications'

# optional
SLACK_USER_NAME # defaults to "Docker Watchdog"
SLACK_USER_ICON # defaults to docker whale icon
WATCHDOG_CONTAINERS # defaults to all containers

Using Docker

docker run --name docker_watchdog --detach --restart=unless-stopped \
  -e HOST=http://ec2.amazon-host.com \
  -e SLACK_CHANNEL='#notifications' \
  -e SLACK_USER_NAME='Docker Watchdog' \
  -e SLACK_USER_ICON=https://www.docker.com/sites/default/files/vertical_large.png \
  -e SLACK_URL=https://hooks.slack.com/services/keykeykey/keykeykey/keykey \
  -e WATCHDOG_CONTAINERS="mongo, myapp, nginx, " \
  -v /var/run/docker.sock:/var/run/docker.sock \
  leonardofalk/docker-watchdog

Using node.js

yarn install # npm install
# export needed vars
yarn start # npm run start

Development

Building

docker build -t leonardofalk/docker-watchdog .

ToDo

  • Write some tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published