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