Sha256: d8294eddbc012b47d1a49a2824e7b498b962a282ca4a4c3e6237d274730f77b8
Contents?: true
Size: 1.38 KB
Versions: 5
Compression:
Stored size: 1.38 KB
Contents
# Monit configuration for PM2 : <%= fetch(:application) %> (<%= fetch(:stage) %>) <% fetch(:monit_pm2_app_instances, 1).times do |n| %> check process <%= fetch(:application) %>_<%= fetch(:stage) %>_pm2_<%= n %> with pidfile <%= fetch(:monit_pm2_pid_path) %>/<%= fetch(:monit_pm2_app_name) %>-<%= n %>.pid group pm2-<%= fetch(:application) %>-<%= fetch(:stage) %> start program = "<%= monit_pm2_prefixed("pm2 restart #{fetch(:monit_pm2_start_script)} --env #{fetch(:monit_pm2_stage)}") %>" stop program = "<%= monit_pm2_prefixed("pm2 stop #{fetch(:monit_pm2_start_script)} --env #{fetch(:monit_pm2_stage)}") %>" # if does not exist then start # (default) if does not exist for 3 cycles then alert # if 3 restarts within 10 cycles then alert # if cpu > 50% then alert # if cpu > 50% for 3 cycles then restart # if 5 restarts within 15 cycles then timeout # alert <%= fetch(:monit_mail_to) %> only on { pid } if changed pid 3 times within 10 cycles then alert <% end %> # Check website for pm2: <%= fetch(:application) %> [<%= fetch(:stage) %>] check host <%= fetch(:monit_pm2_website) %> with address <%= fetch(:monit_pm2_website) %> if failed <% if fetch(:monit_pm2_website_ssl) %> port 443 type TCPSSL protocol https <% else %> port 80 protocol http <% end %> # status = 200 with timeout 13 seconds for 5 cycles then alert
Version data entries
5 entries across 5 versions & 1 rubygems