-
-
Save Aslan/536379 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: [email protected] } | |
set alert [email protected] | |
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 |
set daemon 30 # with start delay 30
set mailserver localhost # sudo apt-get install postfix
set mail-format { from: [email protected] }
set alert [email protected]
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 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 > 100 Mb then alert
check file redis-log with path /data/redis/redis.log
if size > 100 Mb 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
@@@
set daemon 30 # with start delay 30
set mailserver localhost # sudo apt-get install postfix
set mail-format { from: [email protected] }
set alert [email protected]
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 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 > 100 Mb then alert
check file redis-log with path /data/redis/redis.log
if size > 100 Mb 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
@@@
set daemon 30 # with start delay 30
set mailserver localhost # sudo apt-get install postfix
set mail-format { from: [email protected] }
set alert [email protected]
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 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 > 100 Mb then alert
check file redis-log with path /data/redis/redis.log
if size > 100 Mb 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
root@domU-12-31-39-01-60-21:/etc# monit -v -c /data/monit.d/redis_util.monitrc
/data/monit.d/redis_util.monitrc:13: Error: syntax error '100MB'