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.