Fix OpenStack exporter scrape with internal TLS & FQDN

Since switching to use HAProxy to access Prometheus OpenStack exporter,
scraping would fail when using internal TLS with an FQDN (rather than an
IP address) to access the API.

This patch fixes the issue by using the FQDN instead of the VIP address.

Change-Id: Iddbdc4190b7953e9140d0740daf57f4062ba1b76
Closes-Bug: #2008208
This commit is contained in:
Mark Goddard 2023-03-15 14:06:56 +00:00
parent c971799db3
commit c2838823f1
2 changed files with 7 additions and 1 deletions

View File

@ -107,7 +107,7 @@ scrape_configs:
honor_labels: true honor_labels: true
static_configs: static_configs:
- targets: - targets:
- '{{ kolla_internal_vip_address | put_address_in_context('url') }}:{{ prometheus_openstack_exporter_port }}' - '{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ prometheus_openstack_exporter_port }}'
{% endif %} {% endif %}
{% if enable_prometheus_elasticsearch_exporter | bool %} {% if enable_prometheus_elasticsearch_exporter | bool %}

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue where Prometheus would fail to scrape the OpenStack exporter
when using internal TLS with an FQDN. `LP#2008208
<https://bugs.launchpad.net/kolla-ansible/+bug/2008208>`__