OSDN Git Service

Replaced mongrel with thin
[redminele/redminele.git] / ruby / lib / ruby / gems / 1.8 / gems / thin-1.2.11-x86-mswin32 / example / monit_sockets
diff --git a/ruby/lib/ruby/gems/1.8/gems/thin-1.2.11-x86-mswin32/example/monit_sockets b/ruby/lib/ruby/gems/1.8/gems/thin-1.2.11-x86-mswin32/example/monit_sockets
new file mode 100644 (file)
index 0000000..15e9c43
--- /dev/null
@@ -0,0 +1,20 @@
+check process blog1
+    with pidfile /u/apps/blog/shared/pids/thin.14000.pid
+    start program = "ruby thin start -d -e production -u nobody -g nobody -p 14000 -a 127.0.0.1 -P tmp/pids/thin.14000.pid -c /u/apps/blog/current"
+    stop program  = "ruby thin stop -P /u/apps/blog/shared/pids/thin.14000.pid"
+    if totalmem > 90.0 MB for 5 cycles then restart
+    if failed port 14000 then restart
+    if cpu usage > 95% for 3 cycles then restart
+    if 5 restarts within 5 cycles then timeout
+               group blog
+
+check process blog2
+    with pidfile /u/apps/blog/shared/pids/thin.14001.pid
+    start program = "ruby thin start -d -e production -u nobody -g nobody -p 14001 -a 127.0.0.1 -P tmp/pids/thin.14001.pid -c /u/apps/blog/current"
+    stop program  = "ruby thin stop -P /u/apps/blog/shared/pids/thin.14001.pid"
+    if totalmem > 90.0 MB for 5 cycles then restart
+    if failed port 14001 then restart
+    if cpu usage > 95% for 3 cycles then restart
+    if 5 restarts within 5 cycles then timeout
+               group blog
+