Last active
September 12, 2018 05:30
-
-
Save johanburati/6a9bc29a05573d4ec8768a586413d112 to your computer and use it in GitHub Desktop.
monit basic config
This file contains 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 60 | |
set logfile /var/log/monit.log | |
set idfile /var/lib/monit/id | |
set statefile /var/lib/monit/state | |
set eventqueue | |
basedir /var/lib/monit/events | |
slots 100 | |
set httpd port 2812 | |
allow monit:monit read-only | |
check system localhost | |
if loadavg (1min) > 10 then exec "/bin/bash -c '/bin/ps aux > /tmp/ps.$(date +%Y%m%d%H%M%S)'" | |
if loadavg (5min) > 8 then exec "/bin/bash -c '/bin/ps aux > /tmp/ps.$(date +%Y%m%d%H%M%S)'" | |
if memory usage > 80% then exec "/bin/bash -c '/bin/ps aux > /tmp/ps.$(date +%Y%m%d%H%M%S)'" | |
if cpu usage (user) > 10% then exec "/bin/bash -c '/bin/ps aux > /tmp/ps.$(date +%Y%m%d%H%M%S)'" | |
if cpu usage (system) > 10% then exec "/bin/bash -c '/bin/ps aux > /tmp/ps.$(date +%Y%m%d%H%M%S)'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment