如果我的delayed_job
服务器坏了,那么monit
会自动重启delayed_job
服务器吗?
答案 0 :(得分:2)
你必须告诉monit这样做...我使用以下配置:
check process delayed_job with pidfile /srv/rails/restorm_com/current/tmp/pids/delayed_job.pid
start program = "/bin/su -c 'RAILS_ENV=production /srv/rails/restorm_com/current/script/delayed_job start' rails"
stop program = "/bin/su -c 'RAILS_ENV=production /srv/rails/restorm_com/current/script/delayed_job stop' rails"
if cpu > 80% for 3 cycles then alert
if loadavg(5min) greater than 2 for 3 cycles then alert