Like everybody else, I was getting the dreaded “Execution failed” from monit when it couldn’t restart a mongrel which had gone out-of-bounds on its monitoring settings.
The solution that worked for me was the env and $PATH line:
start program = "/usr/bin/env PATH=/bin:/usr/local/bin:$PATH \
ruby mongrel_rails cluster::start \
-C /etc/mongrel_cluster/myapp.yml \
--clean --only 8000"
stop program = "/usr/bin/env PATH=/bin:/usr/local/bin:$PATH \
ruby mongrel_rails cluster::stop \
-C /etc/mongrel_cluster/myapp.yml \
--only 8000"
But what scuppered me and will hopefully help you, is that whilst trying the various options suggested by Google, I wasn’t reloading the monit config. Doh!
So if you’re trying to debug your failing mongrels under monit here are a couple of tips…
Start a new shell, and unset your PATH to mimic how monit behaves:
sh unset PATH
Now you can test your monit stop/start lines (you’ll need to sudo as monit normally runs as root)…
/usr/bin/sudo /usr/bin/env PATH=/bin:/usr/local/bin:$PATH \
mongrel_rails cluster::stop \
-C /etc/mongrel_cluster/myapp.yml \
--only 8000
/usr/bin/sudo /usr/bin/env PATH=/bin:/usr/local/bin:$PATH \
mongrel_rails cluster::start \
-C /etc/mongrel_cluster/myapp.yml \
--clean \
--only 8000
If that works for you, then you can be pretty sure that it’ll work for monit, as long as you remember to reload your monit config after making the changes.

Comments
Excellent advice - fixed my monit.
Thanks for this post. I followed your approach and worked through to a working start and stop command.
The resulting start and stop on my servers is very similar but not exactly the same as the one you’ve posted.