]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix duplicate grafana panels when on mgr failover 56930/head
authorAvan Thakkar <athakkar@redhat.com>
Tue, 2 Apr 2024 09:45:48 +0000 (15:15 +0530)
committerAdam King <adking@redhat.com>
Tue, 16 Apr 2024 18:07:06 +0000 (14:07 -0400)
Fixes: https://tracker.ceph.com/issues/64970
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit e6ff23d1297cbcf5da030178c53e14a6b6ce5f43)

Conflicts:
src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2
src/pybind/mgr/cephadm/tests/test_services.py

src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2
src/pybind/mgr/cephadm/tests/test_services.py

index bb0a8fcae518f45f51c682fa25d8b3ca22d8e66b..a42df93d42c6c91fb61399a94ea777dd65564117 100644 (file)
@@ -14,6 +14,10 @@ alerting:
 scrape_configs:
   - job_name: 'ceph'
     honor_labels: true
+    relabel_configs:
+    - source_labels: [instance]
+      target_label: instance
+      replacement: 'ceph_cluster'
     static_configs:
     - targets:
 {% for mgr in mgr_scrape_list %}
index 9de22e3bf20f8f9dc113b1c88757b472b2ad310a..385a88345616a06ec33d7e6be5e2480ac989d91d 100644 (file)
@@ -475,6 +475,10 @@ class TestMonitoring:
                 scrape_configs:
                   - job_name: 'ceph'
                     honor_labels: true
+                    relabel_configs:
+                    - source_labels: [instance]
+                      target_label: instance
+                      replacement: 'ceph_cluster'
                     static_configs:
                     - targets:
                       - '[::1]:9283'