|
Revision 262, 1.0 kB
(checked in by jk, 6 months ago)
|
fix monit example for new start script
|
| Line | |
|---|
| 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 |
|---|
| 4 |
|
|---|
| 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" |
|---|
| 9 |
|
|---|
| 10 |
# cpu usage boundaries |
|---|
| 11 |
if cpu > 60% for 2 cycles then alert |
|---|
| 12 |
if cpu > 90% for 5 cycles then restart |
|---|
| 13 |
|
|---|
| 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 |
|---|
| 18 |
|
|---|
| 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 |
|---|