I use monit to start and stop a script, and I'm just a little confused because monit seems to say that it has failed with `monit status`.
address@hidden ~]# monit status
The Monit daemon 5.3.2 uptime: 2h 21m
Process 'delayed_job'
status Execution failed
monitoring status Monitored
data collected Mon, 27 Feb 2012 15:22:47
I am starting a script in my rails application called delayed_job. I source this file in my monitrc:
check process delayed_job
with pidfile /var/www/myapp/shared/pids/delayed_job.pid
start program = "/bin/bash -l -c '/usr/bin/env RAILS_ENV=production /var/www/myapp/current/script/delayed_job start'"
stop program = "/bin/bash -l -c '/usr/bin/env RAILS_ENV=production /var/www/myapp/current/script/delayed_job stop'"
I have to do the '/bin/bash -l -c' stuff because I use a program called RVM which sets the current version of Ruby to use, which is set up in a script in /etc/profile.d/.
I'm just a little confused, it looks like monit is saying that it failed? However it *is* running, I can see the process in top and it is working fine.
Thanks,
-Tony