Sha256: 6d07306e5b44f9195800ac48bd53bdcd2d7036e8e60f2da15459e590e0f5791c

Contents?: true

Size: 1.18 KB

Versions: 11

Compression:

Stored size: 1.18 KB

Contents

<% application = fetch(:application) %>
set mail-format { subject: <%= "#{fetch(:full_app_name)} - #{fetch(:rails_env)}" %> $SERVICE $EVENT at $DATE }

check process unicorn
  with pidfile <%= current_path %>/tmp/pids/unicorn.pid
  start program = "/etc/init.d/unicorn_<%= application %>_<%= fetch(:rails_env)%> start"
  stop program = "/etc/init.d/unicorn_<%= application %>_<%= fetch(:rails_env)%> stop"
  if mem is greater than 300.0 MB for 1 cycles then restart       # eating up memory?
  if cpu is greater than 50% for 2 cycles then alert                  # send an email to admin
  if cpu is greater than 80% for 30 cycles then restart                # hung process?
  group unicorn

<% (0..(fetch(:unicorn_worker_count) -1)).each do |worker| %>
  check process unicorn_worker_<%= (5000 + worker).to_s %>
    with pidfile <%= current_path %>/tmp/pids/unicorn.<%= (5000 + worker).to_s %>.pid
    start program = "/bin/true"
    stop program = "/etc/init.d/unicorn_<%= application %>_<%= fetch(:rails_env)%> kill_worker <%= (5000 + worker).to_s %>"
    if mem is greater than 350.0 MB for 1 cycles then restart
    if cpu is greater than 80% for 30 cycles then restart

    group unicorn_workers
<% end %>

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
teleporter-0.0.15 lib/generators/initial/templates/capistrano/shared/monit.erb
teleporter-0.0.14 lib/generators/initial/templates/capistrano/shared/monit.erb
teleporter-0.0.13 lib/generators/initial/templates/capistrano/shared/monit.erb
teleporter-0.0.12 lib/generators/initial/templates/capistrano/shared/monit.erb
teleporter-0.0.11 lib/generators/initial/templates/capistrano/shared/monit.erb
capistrano-cookbook-0.0.5 lib/capistrano/cookbook/templates/monit.erb
capistrano-cookbook-0.0.4 lib/capistrano/cookbook/templates/monit.erb
capistrano-cookbook-0.0.3 lib/capistrano/cookbook/templates/monit.erb
capistrano-cookbook-0.0.2 lib/capistrano/cookbook/templates/monit.erb
capup-0.0.4 lib/capup/templates/monit.erb
capup-0.0.2 lib/capup/templates/monit.erb