Skip to content

Commit b244f26

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

File tree

4 files changed

+221
-0
lines changed

4 files changed

+221
-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 %}

etc/kayobe/kolla/globals.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,8 @@ prometheus_instance_label: "{% raw %}{{ ansible_facts.hostname }}{% endraw %}"
5353
# in Yoga. This is required to include a valid value for the flavor_id label on
5454
# openstack_nova_server_status metrics.
5555
prometheus_openstack_exporter_compute_api_version: "2.1"
56+
57+
prometheus_blackbox_exporter_endpoints_kayobe:
58+
- endpoints:
59+
- "pulp:http_2xx:{{ pulp_url }}/pulp/api/v3/status/"
60+
enabled: "{{ seed_pulp_container_enabled | bool }}"
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
########################################
3+
# Prometheus blackbox monitoring options
4+
########################################
5+
prometheus_blackbox_exporter_endpoints: "{{ prometheus_blackbox_exporter_endpoints_kayobe + prometheus_blackbox_exporter_endpoints_default | selectattr('enabled', 'true') | map(attribute='endpoints') | flatten | union(prometheus_blackbox_exporter_endpoints_custom) | unique | select }}"
6+
7+
prometheus_blackbox_exporter_endpoints_kayobe: []
8+
9+
prometheus_blackbox_exporter_endpoints_custom: []
10+
11+
prometheus_blackbox_exporter_endpoints_default:
12+
# OpenStack endpoints
13+
- endpoints:
14+
- "barbican:os_endpoint:{{ barbican_public_endpoint }}"
15+
- "{{ ('barbican_internal:os_endpoint:' + barbican_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
16+
enabled: "{{ enable_barbican | bool }}"
17+
- endpoints:
18+
- "blazar:os_endpoint:{{ blazar_public_base_endpoint }}"
19+
- "{{ ('blazar_internal:os_endpoint:' + blazar_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
20+
enabled: "{{ enable_blazar | bool }}"
21+
- endpoints:
22+
- "ceph_rgw:http_2xx:{{ ceph_rgw_public_base_endpoint }}"
23+
- "{{ ('ceph_rgw_internal:http_2xx:' + ceph_rgw_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
24+
enabled: "{{ enable_ceph_rgw | bool }}"
25+
- endpoints:
26+
- "cinder:os_endpoint:{{ cinder_public_base_endpoint }}"
27+
- "{{ ('cinder_internal:os_endpoint:' + cinder_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
28+
enabled: "{{ enable_cinder | bool }}"
29+
- endpoints:
30+
- "cloudkitty:os_endpoint:{{ cloudkitty_public_endpoint }}"
31+
- "{{ ('cloudkitty_internal:os_endpoint:' + cloudkitty_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
32+
enabled: "{{ enable_cloudkitty | bool }}"
33+
- endpoints:
34+
- "designate:os_endpoint:{{ designate_public_endpoint }}"
35+
- "{{ ('designate_internal:os_endpoint:' + designate_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
36+
enabled: "{{ enable_designate | bool }}"
37+
- endpoints:
38+
- "glance:os_endpoint:{{ glance_public_endpoint }}"
39+
- "{{ ('glance_internal:os_endpoint:' + glance_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
40+
enabled: "{{ enable_glance | bool }}"
41+
- endpoints:
42+
- "gnocchi:os_endpoint:{{ gnocchi_public_endpoint }}"
43+
- "{{ ('gnocchi_internal:os_endpoint:' + gnocchi_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
44+
enabled: "{{ enable_gnocchi | bool }}"
45+
- endpoints:
46+
- "heat:os_endpoint:{{ heat_public_base_endpoint }}"
47+
- "{{ ('heat_internal:os_endpoint:' + heat_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
48+
- "heat_cfn:os_endpoint:{{ heat_cfn_public_base_endpoint }}"
49+
- "{{ ('heat_cfn_internal:os_endpoint:' + heat_cfn_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
50+
enabled: "{{ enable_heat | bool }}"
51+
- endpoints:
52+
- "horizon:http_2xx:{{ horizon_public_endpoint }}"
53+
- "{{ ('horizon_internal:http_2xx:' + horizon_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
54+
enabled: "{{ enable_horizon | bool }}"
55+
- endpoints:
56+
- "ironic:os_endpoint:{{ ironic_public_endpoint }}"
57+
- "{{ ('ironic_internal:os_endpoint:' + ironic_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
58+
- "ironic_inspector:os_endpoint:{{ ironic_inspector_public_endpoint }}"
59+
- "{{ ('ironic_inspector_internal:os_endpoint:' + ironic_inspector_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
60+
enabled: "{{ enable_ironic | bool }}"
61+
- endpoints:
62+
- "keystone:os_endpoint:{{ keystone_public_url }}"
63+
- "{{ ('keystone_internal:os_endpoint:' + keystone_internal_url) if not kolla_same_external_internal_vip | bool }}"
64+
enabled: "{{ enable_keystone | bool }}"
65+
- endpoints:
66+
- "magnum:os_endpoint:{{ magnum_public_base_endpoint }}"
67+
- "{{ ('magnum_internal:os_endpoint:' + magnum_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
68+
enabled: "{{ enable_magnum | bool }}"
69+
- endpoints:
70+
- "manila:os_endpoint:{{ manila_public_base_endpoint }}"
71+
- "{{ ('manila_internal:os_endpoint:' + manila_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
72+
enabled: "{{ enable_manila | bool }}"
73+
- endpoints:
74+
- "neutron:os_endpoint:{{ neutron_public_endpoint }}"
75+
- "{{ ('neutron_internal:os_endpoint:' + neutron_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
76+
enabled: "{{ enable_neutron | bool }}"
77+
- endpoints:
78+
- "nova:os_endpoint:{{ nova_public_base_endpoint }}"
79+
- "{{ ('nova_internal:os_endpoint:' + nova_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
80+
enabled: "{{ enable_nova | bool }}"
81+
- endpoints:
82+
- "octavia:os_endpoint:{{ octavia_public_endpoint }}"
83+
- "{{ ('octavia_internal:os_endpoint:' + octavia_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
84+
enabled: "{{ enable_octavia | bool }}"
85+
- endpoints:
86+
- "placement:os_endpoint:{{ placement_public_endpoint }}"
87+
- "{{ ('placement_internal:os_endpoint:' + placement_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
88+
enabled: "{{ enable_placement | bool }}"
89+
- endpoints:
90+
- "swift:os_endpoint:{{ swift_public_base_endpoint }}"
91+
- "{{ ('swift_internal:os_endpoint:' + swift_internal_base_endpoint) if not kolla_same_external_internal_vip | bool }}"
92+
enabled: "{{ enable_swift | bool }}"
93+
# Additional service endpoints
94+
- 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 }}"
95+
enabled: "{{ enable_etcd | bool }}"
96+
- endpoints:
97+
- "grafana:http_2xx:{{ grafana_public_endpoint }}"
98+
- "{{ ('grafana_internal:http_2xx:' + grafana_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
99+
enabled: "{{ enable_grafana | bool }}"
100+
- endpoints:
101+
- "opensearch:http_2xx:{{ opensearch_internal_endpoint }}"
102+
enabled: "{{ enable_opensearch | bool }}"
103+
- endpoints:
104+
- "opensearch_dashboards:http_2xx_opensearch_dashboards:{{ opensearch_dashboards_internal_endpoint }}/api/status"
105+
enabled: "{{ enable_opensearch_dashboards | bool }}"
106+
- endpoints:
107+
- "prometheus:http_2xx_prometheus:{{ prometheus_public_endpoint }}/-/healthy"
108+
- "{{ ('prometheus_internal:http_2xx:' + prometheus_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
109+
enabled: "{{ enable_prometheus | bool }}"
110+
- endpoints:
111+
- "prometheus_alertmanager:http_2xx_alertmanager:{{ prometheus_alertmanager_public_endpoint }}"
112+
- "{{ ('prometheus_alertmanager_internal:http_2xx:' + prometheus_alertmanager_internal_endpoint) if not kolla_same_external_internal_vip | bool }}"
113+
enabled: "{{ enable_prometheus_alertmanager | bool }}"
114+
- 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 }}"
115+
enabled: "{{ enable_rabbitmq | bool }}"
116+
- 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 }}"
117+
enabled: "{{ enable_redis | bool }}"
118+
119+
# Ensure service endpoints are defined
120+
blazar_internal_base_endpoint: "{{ blazar_internal_fqdn | kolla_url(internal_protocol, blazar_api_port) }}"
121+
blazar_public_base_endpoint: "{{ blazar_external_fqdn | kolla_url(public_protocol, blazar_api_public_port) }}"
122+
ceph_rgw_internal_base_endpoint: "{{ ceph_rgw_internal_fqdn | kolla_url(internal_protocol, ceph_rgw_port) }}"
123+
ceph_rgw_public_base_endpoint: "{{ ceph_rgw_external_fqdn | kolla_url(public_protocol, ceph_rgw_public_port) }}"
124+
cinder_internal_base_endpoint: "{{ cinder_internal_fqdn | kolla_url(internal_protocol, cinder_api_port) }}"
125+
cinder_public_base_endpoint: "{{ cinder_external_fqdn | kolla_url(public_protocol, cinder_api_public_port) }}"
126+
cloudkitty_internal_endpoint: "{{ cloudkitty_internal_fqdn | kolla_url(internal_protocol, cloudkitty_api_port) }}"
127+
cloudkitty_public_endpoint: "{{ cloudkitty_external_fqdn | kolla_url(public_protocol, cloudkitty_api_public_port) }}"
128+
gnocchi_internal_endpoint: "{{ gnocchi_internal_fqdn | kolla_url(internal_protocol, gnocchi_api_port) }}"
129+
gnocchi_public_endpoint: "{{ gnocchi_external_fqdn | kolla_url(public_protocol, gnocchi_api_public_port) }}"
130+
heat_internal_base_endpoint: "{{ heat_internal_fqdn | kolla_url(internal_protocol, heat_api_port) }}"
131+
heat_public_base_endpoint: "{{ heat_external_fqdn | kolla_url(public_protocol, heat_api_public_port) }}"
132+
heat_cfn_internal_base_endpoint: "{{ heat_cfn_internal_fqdn | kolla_url(internal_protocol, heat_api_cfn_port) }}"
133+
heat_cfn_public_base_endpoint: "{{ heat_cfn_external_fqdn | kolla_url(public_protocol, heat_api_cfn_public_port) }}"
134+
ironic_inspector_internal_endpoint: "{{ ironic_inspector_internal_fqdn | kolla_url(internal_protocol, ironic_inspector_port) }}"
135+
ironic_inspector_public_endpoint: "{{ ironic_inspector_external_fqdn | kolla_url(public_protocol, ironic_inspector_public_port) }}"
136+
magnum_internal_base_endpoint: "{{ magnum_internal_fqdn | kolla_url(internal_protocol, magnum_api_port) }}"
137+
magnum_public_base_endpoint: "{{ magnum_external_fqdn | kolla_url(public_protocol, magnum_api_public_port) }}"
138+
manila_internal_base_endpoint: "{{ manila_internal_fqdn | kolla_url(internal_protocol, manila_api_port) }}"
139+
manila_public_base_endpoint: "{{ manila_external_fqdn | kolla_url(public_protocol, manila_api_public_port) }}"
140+
nova_internal_base_endpoint: "{{ nova_internal_fqdn | kolla_url(internal_protocol, nova_api_port) }}"
141+
nova_public_base_endpoint: "{{ nova_external_fqdn | kolla_url(public_protocol, nova_api_public_port) }}"
142+
placement_internal_endpoint: "{{ placement_internal_fqdn | kolla_url(internal_protocol, placement_api_port) }}"
143+
placement_public_endpoint: "{{ placement_external_fqdn | kolla_url(public_protocol, placement_api_public_port) }}"
144+
swift_public_base_endpoint: "{{ swift_external_fqdn | kolla_url(public_protocol, swift_proxy_server_port) }}"
145+
opensearch_dashboards_internal_fqdn: "{{ kolla_internal_fqdn }}"
146+
opensearch_dashboards_internal_endpoint: "{{ opensearch_dashboards_internal_fqdn | kolla_url(internal_protocol, opensearch_dashboards_port) }}"
147+
prometheus_alertmanager_internal_endpoint: "{{ prometheus_alertmanager_internal_fqdn | kolla_url(internal_protocol, prometheus_alertmanager_port) }}"
148+
prometheus_alertmanager_public_endpoint: "{{ prometheus_alertmanager_external_fqdn | kolla_url(public_protocol, prometheus_alertmanager_public_port) }}"

0 commit comments

Comments
 (0)