Forked from the-frey/monit_block_for_docker_container
Created
November 30, 2015 03:55
-
-
Save vivekjuneja/4dd5cc3ec7819b081bda to your computer and use it in GitHub Desktop.
Monit Service Monitor Block for Docker Container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inside main monitrc | |
# Check that services are running and also define start and stop commands for them. | |
# You will need one of these for each container | |
# as well as working out a restarting and/or red | |
eploying workflow. | |
check process <container-name> with pidfile /var/run/monit/<container-name>.pid | |
start = "/path/to/pid/script start <container-name> '<docker-arguments>'" | |
stop = "/path/to/pid/script stop <container-name>" | |
if does not exist then alert | |
if cpu equal 0% | |
and memory equal 0kB | |
for 5 cycles then alert |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment