Working on a project lately, I wanted to achieve a simple goal that if some particular service is not running, then start it automatically. Normally, such things are done through shell/perl scripts which are executed as cron job. There are some other solutions for this thing as well i.e. www.pingdom.com though this is a paid service. Looking further, I found a very nice open source service for this thing called MONIT.. Following link explains all the steps for installation and some usage examples as well
http://www.cyberciti.biz/tips/howto-monitor-and-restart-linux-unix-service.html
http://www.cyberciti.biz/tips/howto-monitor-and-restart-linux-unix-service.html