Skip to content

Commit c7677ab

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

File tree

3 files changed

+194
-0
lines changed

3 files changed

+194
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,7 @@ 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
71+
pulp_url: ""
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
modules:
2+
http_2xx:
3+
prober: http
4+
os_endpoint:
5+
prober: http
6+
http:
7+
valid_status_codes: [200,300]
8+
headers:
9+
Content-Type: application/json
10+
fail_if_body_not_matches_regexp:
11+
- "versions"
12+
http_post_2xx:
13+
prober: http
14+
http:
15+
method: POST
16+
tcp_connect:
17+
prober: tcp
18+
tls_connect:
19+
prober: tcp
20+
tcp:
21+
tls: true
22+
ssh_banner:
23+
prober: tcp
24+
tcp:
25+
query_response:
26+
- expect: "^SSH-2.0-"
27+
icmp:
28+
prober: icmp
29+
http_2xx_kibana:
30+
prober: http
31+
timeout: 5s
32+
http:
33+
basic_auth:
34+
{% raw %}
35+
username: {{ kibana_user }}
36+
password: {{ kibana_password }}
37+
{% endraw %}
38+
http_2xx_os_dashboards:
39+
prober: http
40+
timeout: 5s
41+
http:
42+
basic_auth:
43+
{% raw %}
44+
username: {{ opensearch_dashboards_user }}
45+
password: {{ opensearch_dashboards_password }}
46+
{% endraw %}
47+
http_2xx_prometheus:
48+
prober: http
49+
timeout: 5s
50+
http:
51+
basic_auth:
52+
{% raw %}
53+
username: admin
54+
password: {{ prometheus_password }}
55+
{% endraw %}
56+
http_2xx_alertmanager:
57+
prober: http
58+
timeout: 5s
59+
http:
60+
basic_auth:
61+
{% raw %}
62+
username: {{ prometheus_alertmanager_user }}
63+
password: {{ prometheus_alertmanager_password }}
64+
{% endraw %}
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
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:{{ kolla_public_endpoint }}:{{ barbican_api_public_port }}"
17+
- "{{ ('barbican_internal:os_endpoint:' + kolla_internal_endpoint + ':' + barbican_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
18+
enabled: "{{ enable_barbican | bool }}"
19+
- endpoints:
20+
- "blazar:os_endpoint:{{ kolla_public_endpoint }}:{{ blazar_api_public_port }}"
21+
- "{{ ('blazar_internal:os_endpoint:' + kolla_internal_endpoint + ':' + blazar_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
22+
enabled: "{{ enable_blazar | bool }}"
23+
- endpoints:
24+
- "ceph_rgw:http_2xx:{{ kolla_public_endpoint }}:{{ ceph_rgw_public_port }}"
25+
- "{{ ('ceph_rgw_internal:os_endpoint:' + kolla_internal_endpoint + ':' + ceph_rgw_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
26+
enabled: "{{ enable_ceph_rgw | bool }}"
27+
- endpoints:
28+
- "cinder:os_endpoint:{{ kolla_public_endpoint }}:{{ cinder_api_public_port }}"
29+
- "{{ ('cinder_internal:os_endpoint:' + kolla_internal_endpoint + ':' + cinder_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
30+
enabled: "{{ enable_cinder | bool }}"
31+
- endpoints:
32+
- "cloudkitty:os_endpoint:{{ kolla_public_endpoint }}:{{ cloudkitty_api_public_port }}"
33+
- "{{ ('cloudkitty_internal:os_endpoint:' + kolla_internal_endpoint + ':' + cloudkitty_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
34+
enabled: "{{ enable_cloudkitty | bool }}"
35+
- endpoints:
36+
- "designate:os_endpoint:{{ kolla_public_endpoint }}:{{ designate_api_public_port }}"
37+
- "{{ ('designate_internal:os_endpoint:' + kolla_internal_endpoint + ':' + designate_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
38+
enabled: "{{ enable_designate | bool }}"
39+
- endpoints:
40+
- "glance:os_endpoint:{{ kolla_public_endpoint }}:{{ glance_api_public_port }}"
41+
- "{{ ('glance_internal:os_endpoint:' + kolla_internal_endpoint + ':' + glance_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
42+
enabled: "{{ enable_glance | bool }}"
43+
- endpoints:
44+
- "heat:os_endpoint:{{ kolla_public_endpoint }}:{{ heat_api_public_port }}"
45+
- "{{ ('heat_internal:os_endpoint:' + kolla_internal_endpoint + ':' + heat_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
46+
- "heat_cfn:os_endpoint:{{ kolla_public_endpoint }}:{{ heat_api_cfn_public_port }}"
47+
- "{{ ('heat_cfn_internal:os_endpoint:' + kolla_internal_endpoint + ':' + heat_api_cfn_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
48+
enabled: "{{ enable_heat | bool }}"
49+
- endpoints:
50+
- "horizon:http_2xx:{{ kolla_public_endpoint }}:{{ horizon_listen_port }}"
51+
- "{{ ('horizon_internal:http_2xx:' + kolla_internal_endpoint + ':' + horizon_listen_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
52+
enabled: "{{ enable_horizon | bool }}"
53+
- endpoints:
54+
- "ironic:os_endpoint:{{ kolla_public_endpoint }}:{{ ironic_api_public_port }}"
55+
- "{{ ('ironic_internal:os_endpoint:' + kolla_internal_endpoint + ':' + ironic_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
56+
- "ironic_inspector:os_endpoint:{{ kolla_public_endpoint }}:{{ ironic_inspector_public_port }}"
57+
- "{{ ('ironic_inspector_internal:os_endpoint:' + kolla_internal_endpoint + ':' + ironic_inspector_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
58+
enabled: "{{ enable_ironic | bool }}"
59+
- endpoints:
60+
- "keystone:os_endpoint:{{ keystone_public_url }}"
61+
- "{{ ('keystone_internal:os_endpoint:' + keystone_internal_url) if keystone_internal_url != keystone_public_url }}"
62+
enabled: "{{ enable_keystone | bool }}"
63+
- endpoints:
64+
- "magnum:os_endpoint:{{ kolla_public_endpoint }}:{{ magnum_api_public_port }}"
65+
- "{{ ('magnum_internal:os_endpoint:' + kolla_internal_endpoint + ':' + magnum_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
66+
enabled: "{{ enable_magnum | bool }}"
67+
- endpoints:
68+
- "manila:os_endpoint:{{ kolla_public_endpoint }}:{{ manila_api_public_port }}"
69+
- "{{ ('manila_internal:os_endpoint:' + kolla_internal_endpoint + ':' + manila_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
70+
enabled: "{{ enable_manila | bool }}"
71+
- endpoints:
72+
- "neutron:os_endpoint:{{ kolla_public_endpoint }}:{{ neutron_server_public_port }}"
73+
- "{{ ('neutron_internal:os_endpoint:' + kolla_internal_endpoint + ':' + neutron_server_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
74+
enabled: "{{ enable_neutron | bool }}"
75+
- endpoints:
76+
- "nova:os_endpoint:{{ kolla_public_endpoint }}:{{ nova_api_public_port }}"
77+
- "{{ ('nova_internal:os_endpoint:' + kolla_internal_endpoint + ':' + nova_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
78+
enabled: "{{ enable_nova | bool }}"
79+
- endpoints:
80+
- "octavia:os_endpoint:{{ kolla_public_endpoint }}:{{ octavia_api_public_port }}"
81+
- "{{ ('octavia_internal:os_endpoint:' + kolla_internal_endpoint + ':' + octavia_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
82+
enabled: "{{ enable_octavia | bool }}"
83+
- endpoints:
84+
- "placement:os_endpoint:{{ kolla_public_endpoint }}:{{ placement_api_public_port }}"
85+
- "{{ ('placement_internal:os_endpoint:' + kolla_internal_endpoint + ':' + placement_api_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
86+
enabled: "{{ enable_placement | bool }}"
87+
- endpoints:
88+
- "swift:os_endpoint:{{ kolla_public_endpoint }}:{{ swift_proxy_server_port }}"
89+
- "{{ ('swift_internal:os_endpoint:' + kolla_internal_endpoint + ':' + swift_proxy_server_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
90+
enabled: "{{ enable_swift | bool }}"
91+
# Additional service endpoints
92+
- 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 }}"
93+
enabled: "{{ enable_etcd | bool }}"
94+
- endpoints:
95+
- "grafana:http_2xx:{{ kolla_public_endpoint }}:{{ grafana_server_port }}"
96+
- "{{ ('grafana_internal:http_2xx:' + kolla_internal_endpoint + ':' + grafana_public_server_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
97+
enabled: "{{ enable_grafana | bool }}"
98+
- endpoints:
99+
- "elasticsearch:http_2xx:{{ internal_protocol }}://{{ elasticsearch_address | put_address_in_context('url') }}:{{ elasticsearch_port }}"
100+
enabled: "{{ enable_elasticsearch | bool }}"
101+
- endpoints:
102+
- "opensearch:http_2xx:{{ internal_protocol }}://{{ opensearch_address | put_address_in_context('url') }}:{{ opensearch_port }}"
103+
enabled: "{{ enable_opensearch | bool }}"
104+
- endpoints:
105+
- "kibana:http_2xx_kibana:{{ kolla_public_endpoint }}:{{ kibana_server_port }}/api/status"
106+
enabled: "{{ enable_kibana | bool }}"
107+
- endpoints:
108+
- "os_dashboards:http_2xx_os_dashboards:{{ kolla_public_endpoint }}:{{ opensearch_dashboards_port }}/api/status"
109+
enabled: "{{ enable_opensearch_dashboards | bool }}"
110+
- endpoints:
111+
- "prometheus:http_2xx_prometheus:{{ kolla_public_endpoint }}:{{ prometheus_port }}/-/healthy"
112+
- "{{ ('prometheus_internal:http_2xx_prometheus:' + kolla_internal_endpoint + ':' + prometheus_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
113+
enabled: "{{ enable_prometheus | bool }}"
114+
- endpoints:
115+
- "prometheus_alertmanager:http_2xx_alertmanager:{{ kolla_public_endpoint }}:{{ prometheus_alertmanager_port }}"
116+
- "{{ ('prometheus_alertmanager_internal:http_2xx_alertmanager:' + kolla_internal_endpoint + ':' + prometheus_alertmanager_port) if kolla_public_endpoint != kolla_internal_endpoint }}"
117+
enabled: "{{ enable_prometheus_alertmanager | bool }}"
118+
- 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 }}"
119+
enabled: "{{ enable_rabbitmq | bool }}"
120+
- 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 }}"
121+
enabled: "{{ enable_redis | bool }}"
122+
# {% endraw %}
123+
- endpoints:
124+
- "pulp:http_2xx:{{ pulp_url }}/pulp/api/v3/status/"
125+
enabled: "{{ seed_pulp_container_enabled | bool }}"
126+

0 commit comments

Comments
 (0)