diff options
Diffstat (limited to 'scripts/install/opensim-monit.conf')
-rw-r--r-- | scripts/install/opensim-monit.conf | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/scripts/install/opensim-monit.conf b/scripts/install/opensim-monit.conf index 7785056..409b69e 100644 --- a/scripts/install/opensim-monit.conf +++ b/scripts/install/opensim-monit.conf | |||
@@ -9,23 +9,16 @@ | |||
9 | # on ubuntu/debian, this is overridden by the CHECK_INTERVALS var in | 9 | # on ubuntu/debian, this is overridden by the CHECK_INTERVALS var in |
10 | # /etc/default/monit . the below assumes you've set it to 30 seconds. | 10 | # /etc/default/monit . the below assumes you've set it to 30 seconds. |
11 | # | 11 | # |
12 | # if process dies, will restart sim within 30 seconds. if process | ||
13 | # dies 5 times in as many tries, will stop trying and send email | ||
14 | # alert. | ||
15 | # | ||
16 | # if SimFPS drops to 0 for 2 minutes, restart. | ||
17 | # | ||
18 | # if process CPU usage stays above 300% for 2 minutes, restart. | ||
19 | # | ||
20 | # see ../README for configuration instructions. | 12 | # see ../README for configuration instructions. |
21 | # | 13 | # |
22 | # Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l. | 14 | # Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l. |
23 | # | 15 | # |
24 | check process sim01 with pidfile /var/run/opensim/sim01.pid | 16 | check process simSIM_NUMBER with pidfile /OS_PATH/caches/simSIM_NUMBER.pid |
25 | start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/start-sim -q'" | 17 | start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /OS_PATH/config/simSIM_NUMBER && /OS_PATH/config/simSIM_NUMBER/start-sim -q'" |
26 | as uid root and gid root | 18 | as uid root and gid root |
27 | stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/stop-sim'" with timeout 600 seconds | 19 | stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /OS_PATH/config/simSIM_NUMBER && /OS_PATH/config/simSIM_NUMBER/stop-sim'" with timeout 600 seconds |
28 | if cpu usage > 50% for 4 cycles then restart | 20 | if cpu usage > 50% for 4 cycles then restart |
21 | if MEMORY usage > 10% for 4 cycles then restart | ||
29 | # if 5 restarts within 5 cycles then timeout | 22 | # if 5 restarts within 5 cycles then timeout |
30 | # if failed url http://127.0.0.1:9005/jsonSimStats/ | 23 | # if failed url http://127.0.0.1:9005/jsonSimStats/ |
31 | # and content != '"SimFPS":0.0,' for 4 cycles | 24 | # and content != '"SimFPS":0.0,' for 4 cycles |
@@ -33,4 +26,4 @@ check process sim01 with pidfile /var/run/opensim/sim01.pid | |||
33 | # if failed url http://127.0.0.1:9008/jsonSimStats/ | 26 | # if failed url http://127.0.0.1:9008/jsonSimStats/ |
34 | # and content == '"SimFPS":' for 4 cycles | 27 | # and content == '"SimFPS":' for 4 cycles |
35 | # then restart | 28 | # then restart |
36 | 29 | depends on ROBUST | |