magic_recipes_two 0.0.42 → 0.0.43
Sign up to get free protection for your applications and to get access to all the features.
- 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 -1
- 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
|
+
ZTlkOGY2YTgxN2FhMmIxZDNlZjk1YmM5MjM2ZGVjYWRiZDlhMzBiZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzA1YzEzZWM0MDVkYmI2MTNjNmE2NTVmN2U0ODI1YjdiY2E3MDYzOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2RiZGQzNDQ1Mzg5YjIwNjUxOTRiZDQ2YTAwNzRmN2M3NjdlOGY3OTNlMjgx
|
10
|
+
MzY4OWJhNWQzYTYzODRmZGE5NTZhNDBiNTcyNmViYTUxOWFiYWVhMmU2MWU2
|
11
|
+
YzBlODk2ODk3NTI2MGFmMmVkMTA0ODdiOTUyNDEwYWE4MWI1MGU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODYyOTlkYmY3NzkzN2NlM2UxYzc4OTE0ODRlNGI3OWM1ZDMwZjZjMjFhMzBk
|
14
|
+
NTYxOWZmNzEzZjMzMzM4MWY1ZDc0MDk3ZWM4MTk2MjMwZjM5MjkwYmI4YmVj
|
15
|
+
ZjQxMzVmMTgyMjhjY2E4NTUxNzgxY2QyODBkY2VhZmZmOWI4MmI=
|
@@ -2,7 +2,8 @@
|
|
2
2
|
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
|
-
if does not exist then
|
5
|
+
# if does not exist then start # (default)
|
6
|
+
if does not exist for 3 cycles then alert
|
6
7
|
if children > 250 then restart
|
7
8
|
if failed host 127.0.0.1 port 80 then restart
|
8
9
|
if cpu is greater than 40% for 2 cycles then alert
|
@@ -2,6 +2,7 @@
|
|
2
2
|
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
|
-
if does not exist then
|
5
|
+
# if does not exist then start # (default)
|
6
|
+
if does not exist for 3 cycles then alert
|
6
7
|
if failed host localhost port 5432 protocol pgsql then restart
|
7
8
|
if 5 restarts within 5 cycles then timeout
|
@@ -2,7 +2,8 @@
|
|
2
2
|
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
|
-
# if does not exist then
|
5
|
+
# if does not exist then start # (default)
|
6
|
+
if does not exist for 3 cycles then alert
|
6
7
|
if 2 restarts within 3 cycles then timeout
|
7
8
|
if totalmem > 100 Mb then alert
|
8
9
|
if children > 255 for 5 cycles then stop
|
@@ -22,7 +22,8 @@ check process <%= sidekiq_service_name(idx) %>
|
|
22
22
|
start program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> ;<% if fetch(:monit_sidekiq_with_secret) %> export SECRET_KEY_BASE=<%= fetch(:secrets_key_base) %>; export <%= fetch(:secrets_key_name) %>=<%= fetch(:secrets_key_base) %>;<% end %> bundle exec sidekiq <%= args.join(" ") %>'" with timeout <%= fetch(:monit_sidekiq_timeout_sec, 90) %> seconds
|
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
|
-
if does not exist then
|
25
|
+
# if does not exist then start # (default)
|
26
|
+
if does not exist for 3 cycles then alert
|
26
27
|
if totalmem > <%= ( fetch( :monit_sidekiq_totalmem_mb, 300 ).to_i * 0.75 ).to_i %> MB then alert
|
27
28
|
if totalmem > <%= fetch( :monit_sidekiq_totalmem_mb, 300 ) %> MB for 2 cycles then restart
|
28
29
|
if 3 restarts within 5 cycles then timeout
|
@@ -4,7 +4,8 @@
|
|
4
4
|
group thin-<%= fetch(:application) %>-<%= fetch(:stage) %>
|
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
|
-
if does not exist then
|
7
|
+
# if does not exist then start # (default)
|
8
|
+
if does not exist for 3 cycles then alert
|
8
9
|
if mem > <%= ( fetch( :monit_thin_totalmem_mb, 300 ).to_i * 0.75 ).to_i %> MB then alert
|
9
10
|
if mem > <%= fetch( :monit_thin_totalmem_mb, 300 ) %> MB for 2 cycles then restart
|
10
11
|
if cpu > 50% then alert
|