From c2838823f1120cb571c1557b9c159d845d85f1a2 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 15 Mar 2023 14:06:56 +0000 Subject: [PATCH] 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 --- ansible/roles/prometheus/templates/prometheus.yml.j2 | 2 +- .../notes/fix-prom-os-exp-fqdn-efb67c364b653bd9.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-prom-os-exp-fqdn-efb67c364b653bd9.yaml diff --git a/ansible/roles/prometheus/templates/prometheus.yml.j2 b/ansible/roles/prometheus/templates/prometheus.yml.j2 index 85483cc918..053ac4c32e 100644 --- a/ansible/roles/prometheus/templates/prometheus.yml.j2 +++ b/ansible/roles/prometheus/templates/prometheus.yml.j2 @@ -107,7 +107,7 @@ scrape_configs: honor_labels: true static_configs: - 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 %} {% if enable_prometheus_elasticsearch_exporter | bool %} diff --git a/releasenotes/notes/fix-prom-os-exp-fqdn-efb67c364b653bd9.yaml b/releasenotes/notes/fix-prom-os-exp-fqdn-efb67c364b653bd9.yaml new file mode 100644 index 0000000000..9dcf7ef752 --- /dev/null +++ b/releasenotes/notes/fix-prom-os-exp-fqdn-efb67c364b653bd9.yaml @@ -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 + `__