Skip to content

Commit

Permalink
Merge pull request ceph#56626 from rhcs-dashboard/fix-prometheus-conf…
Browse files Browse the repository at this point in the history
…-mgr-failover

mgr/dashboard: fix duplicate grafana panels when on mgr failover

Reviewed-by: Adam King <[email protected]>
Reviewed-by: Nizamudeen A <[email protected]>
  • Loading branch information
adk3798 authored Apr 16, 2024
2 parents 117f85b + e6ff23d commit a654945
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ scrape_configs:
tls_config:
ca_file: mgr_prometheus_cert.pem
honor_labels: true
relabel_configs:
- source_labels: [instance]
target_label: instance
replacement: 'ceph_cluster'
http_sd_configs:
- url: {{ mgr_prometheus_sd_url }}
basic_auth:
Expand All @@ -54,6 +58,9 @@ scrape_configs:
- source_labels: [__address__]
target_label: cluster
replacement: {{ cluster_fsid }}
- source_labels: [instance]
target_label: instance
replacement: 'ceph_cluster'
http_sd_configs:
- url: {{ mgr_prometheus_sd_url }}
{% endif %}
Expand Down
7 changes: 7 additions & 0 deletions src/pybind/mgr/cephadm/tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,9 @@ def test_prometheus_config_security_disabled(self, _run_cephadm, cephadm_module:
- source_labels: [__address__]
target_label: cluster
replacement: fsid
- source_labels: [instance]
target_label: instance
replacement: 'ceph_cluster'
http_sd_configs:
- url: http://[::1]:8765/sd/prometheus/sd-config?service=mgr-prometheus
Expand Down Expand Up @@ -904,6 +907,10 @@ def gen_cert(host, addr):
tls_config:
ca_file: mgr_prometheus_cert.pem
honor_labels: true
relabel_configs:
- source_labels: [instance]
target_label: instance
replacement: 'ceph_cluster'
http_sd_configs:
- url: https://[::1]:8765/sd/prometheus/sd-config?service=mgr-prometheus
basic_auth:
Expand Down

0 comments on commit a654945

Please sign in to comment.