# monit configuration snippet to watch the Ferret DRb server shipped with # acts_as_ferret check process ferret with pidfile /path/to/ferret.pid # username is the user the drb server should be running as (It's good practice # to run such services as a non-privileged user) start program = "/bin/su -c 'cd /path/to/your/app/current/ && script/ferret_server -e production start' username" stop program = "/bin/su -c 'cd /path/to/your/app/current/ && script/ferret_server -e production stop' username" # cpu usage boundaries if cpu > 60% for 2 cycles then alert if cpu > 90% for 5 cycles then restart # memory usage varies with index size and usage scenarios, so check how # much memory your DRb server uses up usually and add some spare to that # before enabling this rule: # if totalmem > 50.0 MB for 5 cycles then restart # adjust port numbers according to your setup: if failed port 9010 then alert if failed port 9010 for 2 cycles then restart group ferret