diff options
Diffstat (limited to '')
-rw-r--r-- | opensim-monit.conf | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/opensim-monit.conf b/opensim-monit.conf index 9688a25..7785056 100644 --- a/opensim-monit.conf +++ b/opensim-monit.conf | |||
@@ -19,10 +19,12 @@ | |||
19 | # | 19 | # |
20 | # see ../README for configuration instructions. | 20 | # see ../README for configuration instructions. |
21 | # | 21 | # |
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. | ||
23 | # | ||
22 | check process sim01 with pidfile /var/run/opensim/sim01.pid | 24 | check process sim01 with pidfile /var/run/opensim/sim01.pid |
23 | start program = "/bin/bash -c 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/start-sim -q'" | 25 | start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/start-sim -q'" |
24 | as uid opensim and gid opensim | 26 | as uid root and gid root |
25 | stop program = "/bin/bash -c 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/stop-sim'" with timeout 600 seconds | 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 |
26 | if cpu usage > 50% for 4 cycles then restart | 28 | if cpu usage > 50% for 4 cycles then restart |
27 | # if 5 restarts within 5 cycles then timeout | 29 | # if 5 restarts within 5 cycles then timeout |
28 | # if failed url http://127.0.0.1:9005/jsonSimStats/ | 30 | # if failed url http://127.0.0.1:9005/jsonSimStats/ |