Sep 10, 2009 @ 03:14 pm

Hello there,

I’m sorry for not updating my blog more often. Now is the time to use the best excuse in the world that will make me look like a busy businessman and you will all be impressed. Here we go : I don’t have the time!

I know a lot of you are using GOD to keep your daemons / processes alive. I really don’t want to say bad things about GOD (I can’t because I never tried it)… but I DID read some really nasty things about it and somehow it convinced me to try an alternative : Monit.

The biggest advantage with Monit is that it is written in C instead of ruby… so it doesn’t leak and it appears to be faster. It is also pretty easy to configure. Here is a very basic monit configuration file:

set daemon 60

set httpd port 2812 address localhost
     allow localhost 

check process my_process
  with pidfile /home/apps/someapp/my_process.pid
  start program = "/home/apps/someapp/my_process start"
  stop program = "/home/apps/someapp/my_process stop"

Then, you start the monit daemon by typing : monit

It will poll the monit configuration file every minute (this is the set daemon 60 part) and will restart ‘my_process’ whenever it is not running. Of course this is an extremely simple use case and there are a lot more configuration options you can play with. Have a look at the documentation for more info.

Bookmark this post : These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Reddit
  • del.icio.us
  • Digg
  • Furl
  • Technorati
  • StumbleUpon
Posted under : short & sweet
4 Comments

If you’re interested in learning how to manage delayed_job with monit, I wrote up my experiences on Stack Overflow: http://stackoverflow.com/questions/1226302/how-to-monitor-delayedjob-with-monit

Comment by : Luke FranclNo Gravatar
— September 10, 2009 @ 10:02 pm

I’ve tried god a couple of times. While I don’t agree with the language used in the post you linked with, I would agree that monit is easier to setup and has better stability. I quite like the small web based interface included with monit.

Comment by : jeremyNo Gravatar
— September 12, 2009 @ 2:30 am

I second the love for the web interface. I’ve never used God extensively, but Monit has always been good to me.

Comment by : John YerhotNo Gravatar
— November 4, 2009 @ 12:35 am

Deamon tools .. although meant mainly for djb’s programs can be adapted to continuously run anything ..

Comment by : StanNo Gravatar
— December 9, 2009 @ 3:43 pm




Leave a comment
Name (required)
Email (will not be publish) (required)
Website