diff --git a/config/monit_work.conf b/config/monit_work.conf new file mode 100644 index 000000000..eda9a4e79 --- /dev/null +++ b/config/monit_work.conf @@ -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 diff --git a/fabfile.py b/fabfile.py index 3da9aa9b0..e4ae0c9a5 100644 --- a/fabfile.py +++ b/fabfile.py @@ -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')