We’ve been using monit at Engine Yard on thousands of machines with a great deal of success. Sometimes it can get itself into a weird situation where it lets you down, but by far it does its job exceptionally. When I was setting up process monitoring for a merb app of my own; the logging capabilities of monit really let me down. I had weird stuff happening because the environment was being cleared and I couldn’t track down exactly WHY my merbs kept aborting. So I gave God a try and I really like it. I run god under init and here’s the basics for setting it up on an EY slice or any Linux box for that matter.
% gem install god% mkdir /etc/god% echo "God.load \"/etc/god/*.god\"" > /etc/god/god.config% telinit qNow all you have to do is drop god configs in /etc/god and you’re good to go. You should be able to see some meaningful log output in /var/log/syslog.
Some of my coworkers are still hesitant about it because of the memory consumption and leaks they’ve seen. I kill god once a day with a cron job. :)
0 0 * * * /usr/bin/killall -9 god
p.s. Anyone have a better god config for merb processes? Here’s mine