diff --git a/ansible/roles/prometheus/templates/prometheus.yml.j2 b/ansible/roles/prometheus/templates/prometheus.yml.j2 index a67d6e77ff..2aae337c00 100644 --- a/ansible/roles/prometheus/templates/prometheus.yml.j2 +++ b/ansible/roles/prometheus/templates/prometheus.yml.j2 @@ -203,6 +203,9 @@ scrape_configs: {% if enable_prometheus_etcd_integration | bool %} - job_name: etcd +{% if etcd_enable_tls | bool %} + scheme: https +{% endif %} static_configs: {% for host in groups["etcd"] %} - targets: diff --git a/releasenotes/notes/prometheus-etcd-tls-313e7cf454f6763a.yaml b/releasenotes/notes/prometheus-etcd-tls-313e7cf454f6763a.yaml new file mode 100644 index 0000000000..67f4a2cfb3 --- /dev/null +++ b/releasenotes/notes/prometheus-etcd-tls-313e7cf454f6763a.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue where Prometheus scraping of Etcd metrics would fail if Etcd + TLS is enabled. `LP#2036950 + `__