Monit – clever monitoring of your unix services

monit.jpg


I’ve just discovered this amazingly simple process monitoring tool Monit, that will monitor, alert and restart processes if sees any trouble. We’re currently in the process of adding monit to all our production servers. I’ve been testing how sturdy is it and it seems really good, ie. I can kill a process and it will recover and it will even restart it if the process gets too big!

The configuration is in a psuedo text format. Pretty easy to understand. Here’s an edited version of our config.

check process rails_app_4000 with pidfile /path/to/rails_app/tmp/pids/mongrel.4000.pid
group mongrel
start program = “/usr/bin/mongrel_rails start -d -e production -a 127.0.0.1 -c /path/to/rails_app –user www –group www -p 4000 -P tmp/pids/mongrel.4000.pid -l /path/to/rails_app/log/mongrel.4000.log”
stop program = “/usr/bin/mongrel_rails stop -c /path/to/rails_app/ -P tmp/pids/mongrel.4000.pid”

if failed host 127.0.0.1 port 4000 protocol http
with timeout 20 seconds
then restart

if totalmem > 100 Mb then restart
if cpu is greater than 60% for 2 cycles then alert
#if cpu > 90% for 5 cycles then restart
#if loadavg(5min) greater than 10 for 8 cycles then restart
if 3 restarts within 5 cycles then timeout
group rails_app

Monit is “mongrel friendly” thanks to Peter Jones who has developed a tool called Bowtie to generate mongrel_cluster + apache + monit configs. Its pretty use to use.

We’re now looking at Seesaw as another tool to help with the redundancy of our rails stack . (Its cool to see an app coming out of Australia !)

One Response to “Monit – clever monitoring of your unix services”

  1. Shoaib Says:

    When it comes to network monitoring and systems health I rely on these two tools:

    Munin: http://munin.projects.linpro.no/ :: ntop http://www.ntop.org/ :: phpsysinfo http://phpsysinfo.sourceforge.net/ :: shell based htop does the job just as well 😀

Leave a Reply


http://www.canakkaleruhu.org http://www.vergimevzuati.org http://www.finansaldenetci.com http://www.securityweb.org http://www.siyamiozkan.org http://www.fatmaozkan.com http://www.sgk.biz.tr http://www.denetci.gen.tr http://www.bagimsizdenetim.biz.tr http://www.mevzuat.biz.tr http://www.security.biz.tr http://www.sorgulatr.com http://www.kanunlar.biz http://www.prsorgu.net http://www.sirabul.com http://www.emekliol.org http://www.coklupagerank.com http://www.coklupagerank.net http://www.coklupagerank.org http://www.prsorgu.org http://www.scriptencode.com http://www.sirabul.net http://www.sirabul.org http://www.sitenizanaliz.com http://www.seoisko.com http://www.seomavi.com http://www.scriptencode.net http://www.scriptencode.org