Fixes: https://tracker.ceph.com/issues/59170
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
{% if ceph_exporter_sd_url %}
- job_name: 'ceph-exporter'
+{% if secure_monitoring_stack %}
honor_labels: true
+ scheme: https
+ tls_config:
+ ca_file: root_cert.pem
http_sd_configs:
- url: {{ ceph_exporter_sd_url }}
+ basic_auth:
+ username: {{ service_discovery_username }}
+ password: {{ service_discovery_password }}
tls_config:
ca_file: root_cert.pem
+{% else %}
+ honor_labels: true
+ http_sd_configs:
+ - url: {{ ceph_exporter_sd_url }}
+{% endif %}
{% endif %}
honor_labels: true
http_sd_configs:
- url: http://[::1]:8765/sd/prometheus/sd-config?service=ceph-exporter
- tls_config:
- ca_file: root_cert.pem
""").lstrip()
_run_cephadm.assert_called_with(
- job_name: 'ceph-exporter'
honor_labels: true
+ scheme: https
+ tls_config:
+ ca_file: root_cert.pem
http_sd_configs:
- url: https://[::1]:8765/sd/prometheus/sd-config?service=ceph-exporter
+ basic_auth:
+ username: admin
+ password: fake_password
tls_config:
ca_file: root_cert.pem
""").lstrip()