File: monit_unixsock

package info (click to toggle)
thin 1.2.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,252 kB
  • ctags: 531
  • sloc: ruby: 4,529; ansic: 725; sh: 21; makefile: 16
file content (20 lines) | stat: -rw-r--r-- 1,172 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
check process blog1
    with pidfile /u/apps/blog/shared/pids/thin.1.pid
    start program = "/usr/local/bin/ruby /usr/local/bin/thin start -d -e production -S /u/apps/blog/shared/pids/thin.1.sock -P tmp/pids/thin.1.pid -c /u/apps/blog/current"
    stop program  = "/usr/local/bin/ruby /usr/local/bin/thin stop -P /u/apps/blog/shared/pids/thin.1.pid"
    if totalmem > 90.0 MB for 5 cycles then restart
		if failed unixsocket /u/apps/blog/shared/pids/thin.1.sock 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.2.pid
    start program = "/usr/local/bin/ruby /usr/local/bin/thin start -d -e production -S /u/apps/blog/shared/pids/thin.2.sock -P tmp/pids/thin.2.pid -c /u/apps/blog/current"
    stop program  = "/usr/local/bin/ruby /usr/local/bin/thin stop -P /u/apps/blog/shared/pids/thin.2.pid"
    if totalmem > 90.0 MB for 5 cycles then restart
		if failed unixsocket /u/apps/blog/shared/pids/thin.2.sock then restart
    if cpu usage > 95% for 3 cycles then restart
    if 5 restarts within 5 cycles then timeout
		group blog