Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
$ 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