Skip to content

Instantly share code, notes, and snippets.

@baxang
Forked from Aslan/gist:536379
Created October 24, 2011 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baxang/1308661 to your computer and use it in GitHub Desktop.
Save baxang/1308661 to your computer and use it in GitHub Desktop.
set daemon 30 # with start delay 30
set mailserver localhost # sudo apt-get install postfix
set mail-format { from: monit@mydomain.com }
set alert my@email.com
set logfile /var/log/monit.log
check process redis-server with pidfile /var/run/redis.pid
start program = "/usr/local/bin/redis-server /data/redis/redis.conf"
stop program = "/usr/bin/killall -9 redis-server"
if totalmem is greater than 500.0 MB for 5 cycles then alert
if cpu is greater than 80% for 5 cycles then alert
group redis
check file redis-db with path /data/redis/redis_state.rdb
if size > 100MB then alert
check file redis-log with path /data/redis/redis.log
if size > 100MB then alert
check device rootfs with path /
if space usage > 70% then alert
if inode usage > 70% then alert
check system cornice-redis
if memory usage > 80% then alert
if loadavg (1min) > 4 then alert
if loadavg (5min) > 2 then alert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment