Skip to content

Instantly share code, notes, and snippets.

@badboy
Created February 14, 2010 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badboy/303997 to your computer and use it in GitHub Desktop.
Save badboy/303997 to your computer and use it in GitHub Desktop.
$ cat monitrc.mustache monitrc.yml | mustace
# stripped out static data
# ...
{{#sockets}}
check process blog_thin{{id}} with pidfile {{blog_pid_path}}/thin.{{id}}.pid
start program = "{{thin}} -C {{blog_config_path}} -o {{id}} start"
stop program = "{{thin}} -C {{blog_config_path}} -o {{id}} stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if 3 restarts within 5 cycles then timeout
group blog_thin
{{/sockets}}
---
thin: /usr/local/bin/thin
blog_pid_path: /var/www/sites/blog/current/pids
blog_config_path: /var/www/sites/blog/current/config/thin.yml
sockets:
- { id: 0 }
- { id: 1 }
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment