Sha256: aaaf7a0fb427c69461bb30dc92f152cbda45533bc60cfba25224bf5701d46152

Contents?: true

Size: 975 Bytes

Versions: 25

Compression:

Stored size: 975 Bytes

Contents

# Monit configuration for THIN :  <%= fetch(:application) %>  (<%= fetch(:stage) %>)
<%  fetch(:app_instances, 1).times do |n| %>
  check process <%= fetch(:application) %>_<%= fetch(:stage) %>_thin_<%= n %> with pidfile <%= deploy_to %>/shared/pids/thin_<%= fetch(:application) %>_<%= fetch(:stage) %>.<%= n %>.pid
    group thin-<%= fetch(:application) %>
    group thin-<%= fetch(:stage) %>
    start program = "/bin/su - <%= fetch(:user) %> -c 'cd <%= current_path %> ; bundle exec thin start -C config/thin_app_<%= fetch(:stage) %>.yml -o <%= n %>' "
    stop program = "/bin/su - <%= fetch(:user) %> -c 'cd <%= current_path %> ; bundle exec thin stop -C config/thin_app_<%= fetch(:stage) %>.yml -o <%= n %>' " 
    if mem > 200.0 MB for 1 cycles then restart
    if cpu > 50% for 3 cycles then restart
    if 5 restarts within 5 cycles then timeout
    alert <%= fetch(:monit_mail_to) %> only on { pid }
    if changed pid 2 times within 20 cycles then alert
<% end %>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
magic_recipes_two-0.0.25 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.24 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.23 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.22 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.21 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.20 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.19 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.18 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.17 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.16 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.15 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.14 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.13 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.12 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.11 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.10 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.9 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.8 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.7 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb
magic_recipes_two-0.0.6 lib/generators/capistrano/magic_recipes/templates/monit/thin.erb