summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/cephadm/templates
diff options
context:
space:
mode:
authorAvan Thakkar <athakkar@redhat.com>2024-04-02 11:45:48 +0200
committerAvan Thakkar <athakkar@redhat.com>2024-04-03 17:24:48 +0200
commite6ff23d1297cbcf5da030178c53e14a6b6ce5f43 (patch)
tree826a6eaadb93a27cf8339184629fd42cb738e323 /src/pybind/mgr/cephadm/templates
parentMerge pull request #56533 from phlogistonjohn/jjm-cpatch-before (diff)
downloadceph-e6ff23d1297cbcf5da030178c53e14a6b6ce5f43.tar.xz
ceph-e6ff23d1297cbcf5da030178c53e14a6b6ce5f43.zip
mgr/dashboard: fix duplicate grafana panels when on mgr failover
Fixes: https://tracker.ceph.com/issues/64970 Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Diffstat (limited to 'src/pybind/mgr/cephadm/templates')
-rw-r--r--src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j27
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2 b/src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2
index 931913668ae..faccc8f6de2 100644
--- a/src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2
+++ b/src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2
@@ -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:
@@ -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 %}