magic_recipes_two 0.0.43 → 0.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/capistrano/magic_recipes/version.rb +1 -1
- data/lib/generators/capistrano/magic_recipes/templates/monit/nginx.erb +2 -1
- data/lib/generators/capistrano/magic_recipes/templates/monit/postgresql.erb +2 -1
- data/lib/generators/capistrano/magic_recipes/templates/monit/redis.erb +2 -2
- data/lib/generators/capistrano/magic_recipes/templates/monit/sidekiq.erb +2 -1
- data/lib/generators/capistrano/magic_recipes/templates/monit/thin.erb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODEzMzEyNGE5YjE0YzIwMTRiODE4ZTRjZmZhZDQ5ZDJlYWMzNGJlZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmMwMjIxZGQ0NmNiY2U4YTlkOWE1Nzc0NTc2Y2RiODUyYmM5MTYzZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTNhNGQwNTdmMDIwMWRkMGMxYjM4ZWEwZGYwY2JkOGY1MjM0YWJkY2IxZDQ3
|
10
|
+
OTQ3ZDAzOTc1NmEwZTcwZmVhYjg3ZTRlYzJlODRkNDNhMzk0N2RkM2NkMTQw
|
11
|
+
NmU4OTVmMmQyMmJmNmNhYTM0ODRkNDI4NzI4MmQzM2JjMTJhODE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODMzNGM4ODUwYjhlODVhY2RjYWQ3YTMzYWUxOGVhMTFhZjFkNzczYmUzODMx
|
14
|
+
N2JlYTI0ZDAwZDFlZDUxZWQ1ZGM5MjE4YzVlODU1ZGZjYWYzZWE0ZDlhOGM2
|
15
|
+
OThjZTUxYzA3MzQyNjI5OTliNGQ4NzI2NGJlNzYwZGUzM2E4NDI=
|
@@ -3,7 +3,8 @@ check process nginx with pidfile /var/run/nginx.pid
|
|
3
3
|
start program = "/etc/init.d/nginx start"
|
4
4
|
stop program = "/etc/init.d/nginx stop"
|
5
5
|
# if does not exist then start # (default)
|
6
|
-
if does not exist for 3 cycles then alert
|
6
|
+
# if does not exist for 3 cycles then alert
|
7
|
+
if 3 restarts within 5 cycles then alert
|
7
8
|
if children > 250 then restart
|
8
9
|
if failed host 127.0.0.1 port 80 then restart
|
9
10
|
if cpu is greater than 40% for 2 cycles then alert
|
@@ -3,6 +3,7 @@ check process postgresql with pidfile <%= fetch(:postgresql_pid) %>
|
|
3
3
|
start program = "/etc/init.d/postgresql start"
|
4
4
|
stop program = "/etc/init.d/postgresql stop"
|
5
5
|
# if does not exist then start # (default)
|
6
|
-
if does not exist for 3 cycles then alert
|
6
|
+
# if does not exist for 3 cycles then alert
|
7
|
+
if 3 restarts within 5 cycles then alert
|
7
8
|
if failed host localhost port 5432 protocol pgsql then restart
|
8
9
|
if 5 restarts within 5 cycles then timeout
|
@@ -3,8 +3,8 @@ check process redis with pidfile <%= fetch(:redis_pid) %>
|
|
3
3
|
start program = "/etc/init.d/redis-server start"
|
4
4
|
stop program = "/etc/init.d/redis-server stop"
|
5
5
|
# if does not exist then start # (default)
|
6
|
-
if does not exist for 3 cycles then alert
|
7
|
-
if
|
6
|
+
# if does not exist for 3 cycles then alert
|
7
|
+
if 3 restarts within 5 cycles then alert
|
8
8
|
if totalmem > 100 Mb then alert
|
9
9
|
if children > 255 for 5 cycles then stop
|
10
10
|
if cpu usage > 95% for 3 cycles then restart
|
@@ -23,7 +23,8 @@ check process <%= sidekiq_service_name(idx) %>
|
|
23
23
|
stop program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> ; bundle exec sidekiqctl stop <%= pid_file %>' " with timeout <%= fetch(:monit_sidekiq_timeout_sec, 90) %> seconds
|
24
24
|
group sidekiq-<%= fetch(:sidekiq_monit_group, fetch(:application)) %>-<%= fetch(:stage) %>
|
25
25
|
# if does not exist then start # (default)
|
26
|
-
if does not exist for 3 cycles then alert
|
26
|
+
# if does not exist for 3 cycles then alert
|
27
|
+
if 3 restarts within 5 cycles then alert
|
27
28
|
if totalmem > <%= ( fetch( :monit_sidekiq_totalmem_mb, 300 ).to_i * 0.75 ).to_i %> MB then alert
|
28
29
|
if totalmem > <%= fetch( :monit_sidekiq_totalmem_mb, 300 ) %> MB for 2 cycles then restart
|
29
30
|
if 3 restarts within 5 cycles then timeout
|
@@ -5,7 +5,8 @@
|
|
5
5
|
start program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> ;<% if fetch(:monit_thin_with_secret) %> export SECRET_KEY_BASE=<%= fetch(:secrets_key_base) %>; export <%= fetch(:secrets_key_name) %>=<%= fetch(:secrets_key_base) %>;<% end %> bundle exec thin start -C config/thin_app_<%= fetch(:stage) %>.yml -o <%= n %>' "
|
6
6
|
stop program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> ; bundle exec thin stop -C config/thin_app_<%= fetch(:stage) %>.yml -o <%= n %>' "
|
7
7
|
# if does not exist then start # (default)
|
8
|
-
if does not exist for 3 cycles then alert
|
8
|
+
# if does not exist for 3 cycles then alert
|
9
|
+
if 3 restarts within 5 cycles then alert
|
9
10
|
if mem > <%= ( fetch( :monit_thin_totalmem_mb, 300 ).to_i * 0.75 ).to_i %> MB then alert
|
10
11
|
if mem > <%= fetch( :monit_thin_totalmem_mb, 300 ) %> MB for 2 cycles then restart
|
11
12
|
if cpu > 50% then alert
|