From 4131eb458d0154a9cb34b665b602ac11181f60e0 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Wed, 22 Nov 2023 07:08:19 +0000 Subject: [PATCH] Configure CloudKitty with Prometheus basic auth Closes-Bug: #2044226 Change-Id: I5e17152584b758c9ca4f1cc14520337f979584b7 --- ansible/roles/cloudkitty/templates/cloudkitty.conf.j2 | 4 ++++ .../cloudkitty-prometheus-basic-auth-baa441852d57d121.yaml | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 releasenotes/notes/cloudkitty-prometheus-basic-auth-baa441852d57d121.yaml diff --git a/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2 b/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2 index a83fc6b2c4..1fdb8b5c3b 100644 --- a/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2 +++ b/ansible/roles/cloudkitty/templates/cloudkitty.conf.j2 @@ -69,6 +69,8 @@ region_name = {{ openstack_region_name }} {% if cloudkitty_collector_backend == "prometheus" %} [collector_prometheus] prometheus_url = {{ cloudkitty_prometheus_url }} +prometheus_user = admin +prometheus_password = {{ prometheus_password }} {% if cloudkitty_prometheus_cafile is defined %} cafile = {{ cloudkitty_prometheus_cafile }} @@ -93,6 +95,8 @@ region_name = {{ openstack_region_name }} metric = openstack_identity_project_info scope_attribute = id prometheus_url = {{ cloudkitty_prometheus_url }} +prometheus_user = admin +prometheus_password = {{ prometheus_password }} {% if cloudkitty_prometheus_cafile is defined %} cafile = {{ cloudkitty_prometheus_cafile }} diff --git a/releasenotes/notes/cloudkitty-prometheus-basic-auth-baa441852d57d121.yaml b/releasenotes/notes/cloudkitty-prometheus-basic-auth-baa441852d57d121.yaml new file mode 100644 index 0000000000..0075fe83ae --- /dev/null +++ b/releasenotes/notes/cloudkitty-prometheus-basic-auth-baa441852d57d121.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes CloudKitty failing to query Prometheus now that basic authentication + is required.