Adding monit for work server.

This commit is contained in:
Samuel Clay 2013-12-22 15:17:13 -08:00
parent 7ae3692957
commit a79d0fa6be
2 changed files with 17 additions and 0 deletions

12
config/monit_work.conf Normal file
View file

@ -0,0 +1,12 @@
set daemon 120
set logfile /var/log/monit.log
set eventqueue
basedir /var/monit # set the base directory where events will be stored
slots 100 # optionally limit the queue size
# If no feeds have been queued in the last minute, something is wrong
check file newsblur.log with path /srv/newsblur/logs/newsblur.log
if timestamp > 2 minutes then exec "/usr/bin/supervisorctl reload"
as uid root and gid root

5
fabfile.py vendored
View file

@ -476,6 +476,11 @@ def config_monit_app():
sudo('echo "START=yes" > /etc/default/monit')
sudo('/etc/init.d/monit restart')
def config_monit_work():
put('config/monit_work.conf', '/etc/monit/conf.d/work.conf', use_sudo=True)
sudo('echo "START=yes" > /etc/default/monit')
sudo('/etc/init.d/monit restart')
def config_monit_redis():
sudo('chown root.root /etc/init.d/redis')
sudo('chmod a+x /etc/init.d/redis')