Last active
February 7, 2019 13:23
-
-
Save flexscss/b47d889bc8bc0aa7bc6870b27ee798a1 to your computer and use it in GitHub Desktop.
mongodb monit config
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
// set daemon 5 for fast restart | |
check process mongodb with pidfile /var/lib/mongodb/mongod.lock | |
group database | |
start program = "/bin/systemctl start mongodb" | |
restart program = "/bin/systemctl restart mongodb" | |
stop program = "/bin/systemctl stop mongodb" | |
if failed host localhost port 27017 then restart | |
if 5 restarts within 5 cycles then timeout | |
if cpu > 60% for 2 cycles then alert | |
if cpu > 80% for 5 cycles then restart | |
if loadavg(5min) greater than 10 for 8 cycles then stop | |
if totalmem > 400.0 MB for 5 cycles then restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment