|
1 |
| -<% |
2 |
| - def discover_external_ip |
3 |
| - networks = spec.networks.marshal_dump |
4 |
| - |
5 |
| - _, network = networks.find do |_name, network_spec| |
6 |
| - network_spec.default |
7 |
| - end |
8 |
| - |
9 |
| - if !network |
10 |
| - _, network = networks.first |
11 |
| - end |
12 |
| - |
13 |
| - if !network |
14 |
| - raise "Could not determine IP via network spec: #{networks}" |
15 |
| - end |
16 |
| - |
17 |
| - network.ip |
18 |
| - end |
19 |
| -%> |
20 | 1 |
|
21 | 2 | <% if p("bpm.enabled") %>
|
22 | 3 |
|
23 | 4 | check process cloud_controller_ng
|
24 | 5 | with pidfile /var/vcap/sys/run/bpm/cloud_controller_ng/cloud_controller_ng.pid
|
25 | 6 | start program "/var/vcap/jobs/bpm/bin/bpm start cloud_controller_ng"
|
26 | 7 | stop program "/var/vcap/jobs/bpm/bin/bpm stop cloud_controller_ng"
|
| 8 | + depends on ccng_monit_http_healthcheck |
27 | 9 | group vcap
|
28 | 10 | if totalmem > <%= p("cc.thresholds.api.alert_if_above_mb") %> Mb for 3 cycles then alert
|
29 | 11 | if totalmem > <%= p("cc.thresholds.api.restart_if_consistently_above_mb") %> Mb for 15 cycles then exec "/var/vcap/jobs/cloud_controller_ng/bin/restart_drain"
|
30 | 12 | if totalmem > <%= p("cc.thresholds.api.restart_if_above_mb") %> Mb for 3 cycles then exec "/var/vcap/jobs/cloud_controller_ng/bin/restart_drain"
|
31 |
| -<% if p('cc.nginx.ip').empty? %> |
32 |
| - if failed host <%= discover_external_ip %> port <%= p("cc.external_port") %> protocol http |
33 |
| -<% else %> |
34 |
| - if failed host <%= p('cc.nginx.ip') %> port <%= p("cc.external_port") %> protocol http |
35 |
| -<% end %> |
36 |
| - and request '/v2/info' |
37 |
| - with timeout 60 seconds for 5 cycles |
38 |
| - then restart |
| 13 | + |
| 14 | + |
| 15 | +check process ccng_monit_http_healthcheck |
| 16 | + with pidfile /var/vcap/sys/run/bpm/cloud_controller_ng/ccng_monit_http_healthcheck.pid |
| 17 | + start program "/var/vcap/jobs/bpm/bin/bpm start cloud_controller_ng -p ccng_monit_http_healthcheck" |
| 18 | + stop program "/var/vcap/jobs/bpm/bin/bpm stop cloud_controller_ng -p ccng_monit_http_healthcheck" |
| 19 | + group vcap |
39 | 20 |
|
40 | 21 | <% (1..(p("cc.jobs.local.number_of_workers"))).each do |index| %>
|
41 | 22 | check process cloud_controller_worker_local_<%= index %>
|
@@ -75,14 +56,6 @@ check process cloud_controller_ng
|
75 | 56 | if totalmem > <%= p("cc.thresholds.api.alert_if_above_mb") %> Mb for 3 cycles then alert
|
76 | 57 | if totalmem > <%= p("cc.thresholds.api.restart_if_consistently_above_mb") %> Mb for 15 cycles then exec "/var/vcap/jobs/cloud_controller_ng/bin/restart_drain"
|
77 | 58 | if totalmem > <%= p("cc.thresholds.api.restart_if_above_mb") %> Mb for 3 cycles then exec "/var/vcap/jobs/cloud_controller_ng/bin/restart_drain"
|
78 |
| -<% if p('cc.nginx.ip').empty? %> |
79 |
| - if failed host <%= discover_external_ip %> port <%= p("cc.external_port") %> protocol http |
80 |
| -<% else %> |
81 |
| - if failed host <%= p('cc.nginx.ip') %> port <%= p("cc.external_port") %> protocol http |
82 |
| -<% end %> |
83 |
| - and request '/v2/info' |
84 |
| - with timeout 60 seconds for 5 cycles |
85 |
| - then restart |
86 | 59 |
|
87 | 60 | <% (1..(p("cc.jobs.local.number_of_workers"))).each do |index| %>
|
88 | 61 | check process cloud_controller_worker_local_<%= index %>
|
|
0 commit comments