https://github.com/davidegrayson/docker-monit
Daemon that helps you monitor docker containers with tools like monit by maintaining PID files for the containers. I use this for replylater.com and it's not very polished yet but maybe some people will find it useful.
https://github.com/davidegrayson/docker-monit
Last synced: about 1 year ago
JSON representation
Daemon that helps you monitor docker containers with tools like monit by maintaining PID files for the containers. I use this for replylater.com and it's not very polished yet but maybe some people will find it useful.
- Host: GitHub
- URL: https://github.com/davidegrayson/docker-monit
- Owner: DavidEGrayson
- License: other
- Created: 2014-11-23T19:21:00.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-11-03T16:13:31.000Z (over 8 years ago)
- Last Synced: 2025-03-18T15:54:53.390Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 17
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
docker-monit: very simple daemon that helps you monitor docker containers
by maintaining PID files for them.
Create file /etc/default/docker-monit with contents:
```
CONTAINERS="container1 container2 container3"
```
Then run:
```
cp docker-monit /usr/local/bin/
```
## Upstart users
```
cp docker-monit.conf /etc/init
start docker-monit
stop docker-monit
sudo cat /var/log/upstart/docker-monit.log
```
## Systemd users
```
cp docker-monit.service /etc/systemd/system
/bin/systemctl enable docker-monit.service
service docker-monit start
service docker-monit stop
sudo journalctl -f -u docker-monit.service
```
## Monit users
Create file /etc/monit/conf.d/docker-monit with contents:
```
check process docker-monit with pidfile /var/run/docker-monit.pid
start program = "/sbin/start docker-monit"
stop program = "/sbin/stop docker-monit"
if 5 restarts with 5 cycles then timeout
check process rl_db with path /var/run/docker-monit/rl_db.pid
if 5 restarts with 5 cycles then timeout
```