Skip to content

Commit e7b4a9e

Browse files
committed
Add generic blackbox monitoring configuration
1 parent ba5c309 commit e7b4a9e

File tree

3 files changed

+224
-0
lines changed

3 files changed

+224
-0
lines changed

etc/kayobe/environments/ci-aio/stackhpc-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ stackhpc_docker_registry_password: "{{ stackhpc_repo_mirror_password }}"
6565
pulp_url: "{{ stackhpc_repo_mirror_url }}"
6666
pulp_username: "{{ stackhpc_repo_mirror_username }}"
6767
pulp_password: "{{ stackhpc_repo_mirror_password }}"
68+
69+
# Ensure BlackBox monitoring configuration is generated correctly
70+
seed_pulp_container_enabled: false
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# yamllint disable-file
2+
modules:
3+
http_2xx:
4+
prober: http
5+
os_endpoint:
6+
prober: http
7+
http:
8+
valid_status_codes: [200,300]
9+
headers:
10+
Content-Type: application/json
11+
fail_if_body_not_matches_regexp:
12+
- "versions"
13+
http_post_2xx:
14+
prober: http
15+
http:
16+
method: POST
17+
tcp_connect:
18+
prober: tcp
19+
tls_connect:
20+
prober: tcp
21+
tcp:
22+
tls: true
23+
ssh_banner:
24+
prober: tcp
25+
tcp:
26+
query_response:
27+
- expect: "^SSH-2.0-"
28+
icmp:
29+
prober: icmp
30+
http_2xx_kibana:
31+
prober: http
32+
timeout: 5s
33+
http:
34+
basic_auth:
35+
{% raw %}
36+
username: {{ kibana_user }}
37+
password: {{ kibana_password }}
38+
{% endraw %}
39+
http_2xx_os_dashboards:
40+
prober: http
41+
timeout: 5s
42+
http:
43+
basic_auth:
44+
{% raw %}
45+
username: {{ opensearch_dashboards_user }}
46+
password: {{ opensearch_dashboards_password }}
47+
{% endraw %}
48+
http_2xx_prometheus:
49+
prober: http
50+
timeout: 5s
51+
http:
52+
basic_auth:
53+
{% raw %}
54+
username: admin
55+
password: {{ prometheus_password }}
56+
{% endraw %}
57+
http_2xx_alertmanager:
58+
prober: http
59+
timeout: 5s
60+
http:
61+
basic_auth:
62+
{% raw %}
63+
username: {{ prometheus_alertmanager_user }}
64+
password: {{ prometheus_alertmanager_password }}
65+
{% endraw %}
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
########################################
3+
# Prometheus blackbox monitoring options
4+
########################################
5+
{% raw %}
6+
kolla_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}"
7+
kolla_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn | put_address_in_context('url') }}"
8+
9+
prometheus_blackbox_exporter_endpoints: "{{ prometheus_blackbox_exporter_endpoints_default | selectattr('enabled', 'true') | map(attribute='endpoints') | flatten | union(prometheus_blackbox_exporter_endpoints_custom) | unique | select }}"
10+
11+
prometheus_blackbox_exporter_endpoints_custom: []
12+
13+
prometheus_blackbox_exporter_endpoints_default:
14+
# OpenStack endpoints
15+
- endpoints:
16+
- "barbican:os_endpoint:{{ barbican_public_endpoint }}"
17+
- "{{ ('barbican_internal:os_endpoint:' + barbican_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
18+
enabled: "{{ enable_barbican | bool }}"
19+
- endpoints:
20+
- "blazar:os_endpoint:{{ blazar_public_base_endpoint }}"
21+
- "{{ ('blazar_internal:os_endpoint:' + blazar_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
22+
enabled: "{{ enable_blazar | bool }}"
23+
- endpoints:
24+
- "ceph_rgw:http_2xx:{{ ceph_rgw_public_base_endpoint }}"
25+
- "{{ ('ceph_rgw_internal:http_2xx:' + ceph_rgw_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
26+
enabled: "{{ enable_ceph_rgw | bool }}"
27+
- endpoints:
28+
- "cinder:os_endpoint:{{ cinder_public_base_endpoint }}"
29+
- "{{ ('cinder_internal:os_endpoint:' + cinder_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
30+
enabled: "{{ enable_cinder | bool }}"
31+
- endpoints:
32+
- "cloudkitty:os_endpoint:{{ cloudkitty_public_endpoint }}"
33+
- "{{ ('cloudkitty_internal:os_endpoint:' + cloudkitty_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
34+
enabled: "{{ enable_cloudkitty | bool }}"
35+
- endpoints:
36+
- "designate:os_endpoint:{{ designate_public_endpoint }}"
37+
- "{{ ('designate_internal:os_endpoint:' + designate_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
38+
enabled: "{{ enable_designate | bool }}"
39+
- endpoints:
40+
- "glance:os_endpoint:{{ glance_public_endpoint }}"
41+
- "{{ ('glance_internal:os_endpoint:' + glance_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
42+
enabled: "{{ enable_glance | bool }}"
43+
- endpoints:
44+
- "gnocchi:os_endpoint:{{ gnocchi_public_endpoint }}"
45+
- "{{ ('gnocchi_internal:os_endpoint:' + gnocchi_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
46+
enabled: "{{ enable_gnocchi | bool }}"
47+
- endpoints:
48+
- "heat:os_endpoint:{{ heat_public_base_endpoint }}"
49+
- "{{ ('heat_internal:os_endpoint:' + heat_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
50+
- "heat_cfn:os_endpoint:{{ heat_cfn_public_base_endpoint }}"
51+
- "{{ ('heat_cfn_internal:os_endpoint:' + heat_cfn_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
52+
enabled: "{{ enable_heat | bool }}"
53+
- endpoints:
54+
- "horizon:http_2xx:{{ horizon_public_endpoint }}"
55+
- "{{ ('horizon_internal:http_2xx:' + horizon_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
56+
enabled: "{{ enable_horizon | bool }}"
57+
- endpoints:
58+
- "ironic:os_endpoint:{{ ironic_public_endpoint }}"
59+
- "{{ ('ironic_internal:os_endpoint:' + ironic_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
60+
- "ironic_inspector:os_endpoint:{{ ironic_inspector_public_endpoint }}"
61+
- "{{ ('ironic_inspector_internal:os_endpoint:' + ironic_inspector_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
62+
enabled: "{{ enable_ironic | bool }}"
63+
- endpoints:
64+
- "keystone:os_endpoint:{{ keystone_public_url }}"
65+
- "{{ ('keystone_internal:os_endpoint:' + keystone_internal_url) if not kolla_same_external_internal_vip | bool }}"
66+
enabled: "{{ enable_keystone | bool }}"
67+
- endpoints:
68+
- "magnum:os_endpoint:{{ magnum_public_base_endpoint }}"
69+
- "{{ ('magnum_internal:os_endpoint:' + magnum_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
70+
enabled: "{{ enable_magnum | bool }}"
71+
- endpoints:
72+
- "manila:os_endpoint:{{ manila_public_base_endpoint }}"
73+
- "{{ ('manila_internal:os_endpoint:' + manila_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
74+
enabled: "{{ enable_manila | bool }}"
75+
- endpoints:
76+
- "neutron:os_endpoint:{{ neutron_public_endpoint }}"
77+
- "{{ ('neutron_internal:os_endpoint:' + neutron_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
78+
enabled: "{{ enable_neutron | bool }}"
79+
- endpoints:
80+
- "nova:os_endpoint:{{ nova_public_base_endpoint }}"
81+
- "{{ ('nova_internal:os_endpoint:' + nova_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
82+
enabled: "{{ enable_nova | bool }}"
83+
- endpoints:
84+
- "octavia:os_endpoint:{{ octavia_public_endpoint }}"
85+
- "{{ ('octavia_internal:os_endpoint:' + octavia_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
86+
enabled: "{{ enable_octavia | bool }}"
87+
- endpoints:
88+
- "placement:os_endpoint:{{ placement_public_endpoint }}"
89+
- "{{ ('placement_internal:os_endpoint:' + placement_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
90+
enabled: "{{ enable_placement | bool }}"
91+
- endpoints:
92+
- "swift:os_endpoint:{{ swift_public_base_endpoint }}"
93+
- "{{ ('swift_internal:os_endpoint:' + swift_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
94+
enabled: "{{ enable_swift | bool }}"
95+
# Additional service endpoints
96+
- endpoints: "{% set etcd_endpoints = [] %}{% for host in groups.get('etcd', []) %}{{ etcd_endpoints.append('etcd_' + host + ':http_2xx:' + hostvars[host]['etcd_client_internal_endpoint'] + '/metrics')}}{% endfor %}{{ etcd_endpoints }}"
97+
enabled: "{{ enable_etcd | bool }}"
98+
- endpoints:
99+
- "grafana:http_2xx:{{ grafana_public_endpoint }}"
100+
- "{{ ('grafana_internal:http_2xx:' + grafana_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
101+
enabled: "{{ enable_grafana | bool }}"
102+
- endpoints:
103+
- "opensearch:http_2xx:{{ opensearch_internal_endpoint }}"
104+
enabled: "{{ enable_opensearch | bool }}"
105+
- endpoints:
106+
- "opensearch_dashboards:http_2xx_opensearch_dashboards:{{ opensearch_dashboards_internal_endpoint }}/api/status"
107+
enabled: "{{ enable_opensearch_dashboards | bool }}"
108+
- endpoints:
109+
- "prometheus:http_2xx_prometheus:{{ prometheus_public_endpoint }}/-/healthy"
110+
- "{{ ('prometheus_internal:http_2xx:' + prometheus_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
111+
enabled: "{{ enable_prometheus | bool }}"
112+
- endpoints:
113+
- "prometheus_alertmanager:http_2xx_alertmanager:{{ prometheus_alertmanager_public_endpoint }}"
114+
- "{{ ('prometheus_alertmanager_internal:http_2xx:' + prometheus_alertmanager_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
115+
enabled: "{{ enable_prometheus_alertmanager | bool }}"
116+
- endpoints: "{% set rabbitmq_endpoints = [] %}{% for host in groups.get('rabbitmq', []) %}{{ rabbitmq_endpoints.append('rabbitmq_' + host + ':tcp_connect:' + ('api' | kolla_address(host) | put_address_in_context('url')) + ':' + hostvars[host]['rabbitmq_port'] ) }}{% endfor %}{{ rabbitmq_endpoints }}"
117+
enabled: "{{ enable_rabbitmq | bool }}"
118+
- endpoints: "{% set redis_endpoints = [] %}{% for host in groups.get('redis', []) %}{{ redis_endpoints.append('redis_' + host + ':tcp_connect:' + ('api' | kolla_address(host) | put_address_in_context('url')) + ':' + hostvars[host]['redis_port']) }}{% endfor %}{{ redis_endpoints }}"
119+
enabled: "{{ enable_redis | bool }}"
120+
{% endraw %}
121+
- endpoints:
122+
- "pulp:http_2xx:{{ pulp_url }}/pulp/api/v3/status/"
123+
enabled: "{{ seed_pulp_container_enabled | bool }}"
124+
125+
# Ensure service endpoints are defined
126+
{% raw %}
127+
blazar_internal_base_endpoint: "{{ blazar_internal_fqdn | kolla_url(internal_protocol, blazar_api_port) }}"
128+
blazar_public_base_endpoint: "{{ blazar_external_fqdn | kolla_url(public_protocol, blazar_api_public_port) }}"
129+
ceph_rgw_internal_base_endpoint: "{{ ceph_rgw_internal_fqdn | kolla_url(internal_protocol, ceph_rgw_port) }}"
130+
ceph_rgw_public_base_endpoint: "{{ ceph_rgw_external_fqdn | kolla_url(public_protocol, ceph_rgw_public_port) }}"
131+
cinder_internal_base_endpoint: "{{ cinder_internal_fqdn | kolla_url(internal_protocol, cinder_api_port) }}"
132+
cinder_public_base_endpoint: "{{ cinder_external_fqdn | kolla_url(public_protocol, cinder_api_public_port) }}"
133+
cloudkitty_internal_endpoint: "{{ cloudkitty_internal_fqdn | kolla_url(internal_protocol, cloudkitty_api_port) }}"
134+
cloudkitty_public_endpoint: "{{ cloudkitty_external_fqdn | kolla_url(public_protocol, cloudkitty_api_public_port) }}"
135+
gnocchi_internal_endpoint: "{{ gnocchi_internal_fqdn | kolla_url(internal_protocol, gnocchi_api_port) }}"
136+
gnocchi_public_endpoint: "{{ gnocchi_external_fqdn | kolla_url(public_protocol, gnocchi_api_public_port) }}"
137+
heat_internal_base_endpoint: "{{ heat_internal_fqdn | kolla_url(internal_protocol, heat_api_port) }}"
138+
heat_public_base_endpoint: "{{ heat_external_fqdn | kolla_url(public_protocol, heat_api_public_port) }}"
139+
heat_cfn_internal_base_endpoint: "{{ heat_cfn_internal_fqdn | kolla_url(internal_protocol, heat_api_cfn_port) }}"
140+
heat_cfn_public_base_endpoint: "{{ heat_cfn_external_fqdn | kolla_url(public_protocol, heat_api_cfn_public_port) }}"
141+
ironic_inspector_internal_endpoint: "{{ ironic_inspector_internal_fqdn | kolla_url(internal_protocol, ironic_inspector_port) }}"
142+
ironic_inspector_public_endpoint: "{{ ironic_inspector_external_fqdn | kolla_url(public_protocol, ironic_inspector_public_port) }}"
143+
magnum_internal_base_endpoint: "{{ magnum_internal_fqdn | kolla_url(internal_protocol, magnum_api_port) }}"
144+
magnum_public_base_endpoint: "{{ magnum_external_fqdn | kolla_url(public_protocol, magnum_api_public_port) }}"
145+
manila_internal_base_endpoint: "{{ manila_internal_fqdn | kolla_url(internal_protocol, manila_api_port) }}"
146+
manila_public_base_endpoint: "{{ manila_external_fqdn | kolla_url(public_protocol, manila_api_public_port) }}"
147+
nova_internal_base_endpoint: "{{ nova_internal_fqdn | kolla_url(internal_protocol, nova_api_port) }}"
148+
nova_public_base_endpoint: "{{ nova_external_fqdn | kolla_url(public_protocol, nova_api_public_port) }}"
149+
placement_internal_endpoint: "{{ placement_internal_fqdn | kolla_url(internal_protocol, placement_api_port) }}"
150+
placement_public_endpoint: "{{ placement_external_fqdn | kolla_url(public_protocol, placement_api_public_port) }}"
151+
swift_public_base_endpoint: "{{ swift_external_fqdn | kolla_url(public_protocol, swift_proxy_server_port) }}"
152+
opensearch_dashboards_internal_fqdn: "{{ kolla_internal_fqdn }}"
153+
opensearch_dashboards_internal_endpoint: "{{ opensearch_dashboards_internal_fqdn | kolla_url(internal_protocol, opensearch_dashboards_port) }}"
154+
prometheus_alertmanager_internal_endpoint: "{{ prometheus_alertmanager_internal_fqdn | kolla_url(internal_protocol, prometheus_alertmanager_port) }}"
155+
prometheus_alertmanager_public_endpoint: "{{ prometheus_alertmanager_external_fqdn | kolla_url(public_protocol, prometheus_alertmanager_public_port) }}"
156+
{% endraw %}

0 commit comments

Comments
 (0)