From 775fac2b10930f522fcfff55768f3ac9d18eb0a7 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Fri, 17 Nov 2023 18:25:12 +0000 Subject: [PATCH] Fix an issue with prometheus scraping itself Closes-Bug: #2043829 Change-Id: Ic4cbaf592a2699d9c0312c575f68613c8681239f --- ansible/roles/prometheus/templates/prometheus.yml.j2 | 3 +++ ...sue-with-prometheus-scraping-itself-308fa19734fd0939.yaml | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 releasenotes/notes/fixes-issue-with-prometheus-scraping-itself-308fa19734fd0939.yaml diff --git a/ansible/roles/prometheus/templates/prometheus.yml.j2 b/ansible/roles/prometheus/templates/prometheus.yml.j2 index 59699a6ceb..be4febed04 100644 --- a/ansible/roles/prometheus/templates/prometheus.yml.j2 +++ b/ansible/roles/prometheus/templates/prometheus.yml.j2 @@ -18,6 +18,9 @@ rule_files: scrape_configs: - job_name: prometheus + basic_auth: + username: admin + password: "{{ prometheus_password }}" static_configs: {% for host in groups['prometheus'] %} - targets: diff --git a/releasenotes/notes/fixes-issue-with-prometheus-scraping-itself-308fa19734fd0939.yaml b/releasenotes/notes/fixes-issue-with-prometheus-scraping-itself-308fa19734fd0939.yaml new file mode 100644 index 0000000000..3bd26a09f2 --- /dev/null +++ b/releasenotes/notes/fixes-issue-with-prometheus-scraping-itself-308fa19734fd0939.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes an issue with prometheus scraping itself now that basic auth has + been enabled.