Skip to content

Commit eba14f9

Browse files
committed
Add generic blackbox monitoring configuration
1 parent ee07cd3 commit eba14f9

File tree

2 files changed

+130
-1
lines changed

2 files changed

+130
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,7 @@ stackhpc_include_os_minor_version_in_repo_url: true
7979
stackhpc_docker_registry: "{{ stackhpc_repo_mirror_url | regex_replace('^https?://', '') }}"
8080
stackhpc_docker_registry_username: "{{ stackhpc_repo_mirror_username }}"
8181
stackhpc_docker_registry_password: "{{ stackhpc_repo_mirror_password }}"
82+
83+
# Ensure BlackBox monitoring configuration is generated correctly
84+
seed_pulp_container_enabled: false
85+
pulp_url: ""

etc/kayobe/kolla/globals.yml

Lines changed: 126 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,130 @@ prometheus_ceph_mgr_exporter_endpoints:
6969
{% endfor %}
7070
{% endif %}
7171

72-
#############################################################################
7372

73+
########################################
74+
# Prometheus blackbox monitoring options
75+
########################################
76+
{% raw %}
77+
kolla_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}"
78+
kolla_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn | put_address_in_context('url') }}"
79+
80+
prometheus_blackbox_exporter_endpoints_custom: []
81+
82+
prometheus_blackbox_exporter_endpoints_default:
83+
# OpenStack endpoints
84+
- endpoints:
85+
- "barbican:os_endpoint:{{ kolla_public_endpoint }}:{{ barbican_api_public_port }}"
86+
- "{{ ('barbican_internal:os_endpoint:' + kolla_internal_endpoint + ':' + barbican_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
87+
enabled: "{{ enable_barbican | bool }}"
88+
- endpoints:
89+
- "blazar:os_endpoint:{{ kolla_public_endpoint }}:{{ blazar_api_public_port }}"
90+
- "{{ ('blazar_internal:os_endpoint:' + kolla_internal_endpoint + ':' + blazar_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
91+
enabled: "{{ enable_blazar | bool }}"
92+
- endpoints:
93+
- "ceph_rgw:os_endpoint:{{ kolla_public_endpoint }}:{{ ceph_rgw_public_port }}"
94+
- "{{ ('ceph_rgw_internal:os_endpoint:' + kolla_internal_endpoint + ':' + ceph_rgw_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
95+
enabled: "{{ enable_ceph_rgw | bool }}"
96+
- endpoints:
97+
- "cinder:os_endpoint:{{ kolla_public_endpoint }}:{{ cinder_api_public_port }}"
98+
- "{{ ('cinder_internal:os_endpoint:' + kolla_internal_endpoint + ':' + cinder_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
99+
enabled: "{{ enable_cinder | bool }}"
100+
- endpoints:
101+
- "cloudkitty:os_endpoint:{{ kolla_public_endpoint }}:{{ cloudkitty_api_public_port }}"
102+
- "{{ ('cloudkitty_internal:os_endpoint:' + kolla_internal_endpoint + ':' + cloudkitty_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
103+
enabled: "{{ enable_cloudkitty | bool }}"
104+
- endpoints:
105+
- "designate:os_endpoint:{{ kolla_public_endpoint }}:{{ designate_api_public_port }}"
106+
- "{{ ('designate_internal:os_endpoint:' + kolla_internal_endpoint + ':' + designate_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
107+
enabled: "{{ enable_designate | bool }}"
108+
- endpoints:
109+
- "glance:os_endpoint:{{ kolla_public_endpoint }}:{{ glance_api_public_port }}"
110+
- "{{ ('glance_internal:os_endpoint:' + kolla_internal_endpoint + ':' + glance_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
111+
enabled: "{{ enable_glance | bool }}"
112+
- endpoints:
113+
- "heat:os_endpoint:{{ kolla_public_endpoint }}:{{ heat_api_public_port }}"
114+
- "{{ ('heat_internal:os_endpoint:' + kolla_internal_endpoint + ':' + heat_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
115+
- "heat_cfn:os_endpoint:{{ kolla_public_endpoint }}:{{ heat_api_cfn_public_port }}"
116+
- "{{ ('heat_cfn_internal:os_endpoint:' + kolla_internal_endpoint + ':' + heat_api_cfn_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
117+
enabled: "{{ enable_heat | bool }}"
118+
- endpoints:
119+
- "horizon:http_2xx:{{ kolla_public_endpoint }}:{{ horizon_listen_port }}"
120+
- "{{ ('horizon_internal:http_2xx:' + kolla_internal_endpoint + ':' + horizon_listen_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
121+
enabled: "{{ enable_horizon | bool }}"
122+
- endpoints:
123+
- "ironic:os_endpoint:{{ kolla_public_endpoint }}:{{ ironic_api_public_port }}"
124+
- "{{ ('ironic_internal:os_endpoint:' + kolla_internal_endpoint + ':' + ironic_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
125+
- "ironic_inspector:os_endpoint:{{ kolla_public_endpoint }}:{{ ironic_inspector_public_port }}"
126+
- "{{ ('ironic_inspector_internal:os_endpoint:' + kolla_internal_endpoint + ':' + ironic_inspector_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
127+
enabled: "{{ enable_ironic | bool }}"
128+
- endpoints:
129+
- "keystone:os_endpoint:{{ keystone_public_url }}"
130+
- "{{ ('keystone_internal:os_endpoint:' + keystone_internal_url) if keystone_internal_url != keystone_public_url }}"
131+
enabled: "{{ enable_keystone | bool }}"
132+
- endpoints:
133+
- "magnum:os_endpoint:{{ kolla_public_endpoint }}:{{ magnum_api_public_port }}"
134+
- "{{ ('magnum_internal:os_endpoint:' + kolla_internal_endpoint + ':' + magnum_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
135+
enabled: "{{ enable_magnum | bool }}"
136+
- endpoints:
137+
- "manila:os_endpoint:{{ kolla_public_endpoint }}:{{ manila_api_public_port }}"
138+
- "{{ ('manila_internal:os_endpoint:' + kolla_internal_endpoint + ':' + manila_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
139+
- "manila_v2:os_endpoint:{{ kolla_public_endpoint }}:{{ manila_api_public_port }}"
140+
- "{{ ('manila_v2_internal:os_endpoint:' + kolla_internal_endpoint + ':' + manila_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
141+
enabled: "{{ enable_manila | bool }}"
142+
- endpoints:
143+
- "neutron:os_endpoint:{{ kolla_public_endpoint }}:{{ neutron_server_public_port }}"
144+
- "{{ ('neutron_internal:os_endpoint:' + kolla_internal_endpoint + ':' + neutron_server_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
145+
enabled: "{{ enable_neutron | bool }}"
146+
- endpoints:
147+
- "nova:os_endpoint:{{ kolla_public_endpoint }}:{{ nova_api_public_port }}"
148+
- "{{ ('nova_internal:os_endpoint:' + kolla_internal_endpoint + ':' + nova_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
149+
enabled: "{{ enable_nova | bool }}"
150+
- endpoints:
151+
- "octavia:os_endpoint:{{ kolla_public_endpoint }}:{{ octavia_api_public_port }}"
152+
- "{{ ('octavia_internal:os_endpoint:' + kolla_internal_endpoint + ':' + octavia_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
153+
enabled: "{{ enable_octavia | bool }}"
154+
- endpoints:
155+
- "placement:os_endpoint:{{ kolla_public_endpoint }}:{{ placement_api_public_port }}"
156+
- "{{ ('placement_internal:os_endpoint:' + kolla_internal_endpoint + ':' + placement_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
157+
enabled: "{{ enable_placement | bool }}"
158+
- endpoints:
159+
- "swift:os_endpoint:{{ kolla_public_endpoint }}:{{ swift_proxy_server_port }}"
160+
- "{{ ('swift_internal:os_endpoint:' + kolla_internal_endpoint + ':' + swift_proxy_server_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
161+
enabled: "{{ enable_swift | bool }}"
162+
# Additional service endpoints
163+
- endpoints: "{% set etcd_endpoints = [] %}{% for host in groups.get('etcd', []) %}{{ etcd_endpoints.append('etcd_' + host + ':http_2xx:' + etcd_protocol + '://' + ('api' | kolla_address(host) | put_address_in_context('url')) + ':' + hostvars[host]['etcd_client_port'] + '/metrics')}}{% endfor %}{{ etcd_endpoints }}"
164+
enabled: "{{ enable_etcd | bool }}"
165+
- endpoints:
166+
- "grafana:http_2xx:{{ kolla_public_endpoint }}:{{ grafana_server_port }}"
167+
- "{{ ('grafana_internal:http_2xx:' + kolla_internal_endpoint + ':' + grafana_public_server_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
168+
enabled: "{{ enable_grafana | bool }}"
169+
- endpoints:
170+
- "elasticsearch:http_2xx:{{ internal_protocol }}://{{ elasticsearch_address | put_address_in_context('url') }}:{{ elasticsearch_port }}"
171+
enabled: "{{ enable_elasticsearch | bool }}"
172+
- endpoints:
173+
- "opensearch:http_2xx:{{ internal_protocol }}://{{ opensearch_address | put_address_in_context('url') }}:{{ opensearch_port }}"
174+
enabled: "{{ enable_opensearch | bool }}"
175+
- endpoints:
176+
- "kibana:http_2xx_kibana:{{ kolla_public_endpoint }}:{{ kibana_server_port }}/api/status"
177+
enabled: "{{ enable_kibana | bool }}"
178+
- endpoints:
179+
- "os_dashboards:http_2xx_os_dashboards:{{ kolla_public_endpoint }}:{{ opensearch_dashboards_port }}/api/status"
180+
enabled: "{{ enable_opensearch_dashboards | bool }}"
181+
- endpoints:
182+
- "prometheus:http_2xx_prometheus:{{ kolla_public_endpoint }}:{{ prometheus_port }}/-/healthy"
183+
- "{{ ('prometheus_internal:http_2xx_prometheus:' + kolla_internal_endpoint + ':' + prometheus_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
184+
enabled: "{{ enable_prometheus | bool }}"
185+
- endpoints:
186+
- "prometheus_alertmanager:http_2xx_alertmanager:{{ kolla_public_endpoint }}:{{ prometheus_alertmanager_port }}"
187+
- "{{ ('prometheus_alertmanager_internal:http_2xx_alertmanager:' + kolla_internal_endpoint + ':' + prometheus_alertmanager_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
188+
enabled: "{{ enable_prometheus_alertmanager | bool }}"
189+
- 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 }}"
190+
enabled: "{{ enable_rabbitmq | bool }}"
191+
- 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 }}"
192+
enabled: "{{ enable_redis | bool }}"
193+
{% endraw %}
194+
- endpoints:
195+
- "pulp:http_2xx:{{ pulp_url }}/pulp/api/v3/status/"
196+
enabled: "{{ seed_pulp_container_enabled | bool }}"
197+
198+
prometheus_blackbox_exporter_endpoints: "{{ prometheus_blackbox_exporter_endpoints_default | selectattr('enabled', 'true') | map(attribute='endpoints') | flatten | union(prometheus_blackbox_exporter_endpoints_custom) | unique | select }}"

0 commit comments

Comments
 (0)