]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
quincy: mgr/dashboard: fix duplicate grafana panels when on mgr failover 56270/head
authorAvan Thakkar <athakkar@redhat.com>
Mon, 18 Mar 2024 17:41:12 +0000 (23:11 +0530)
committerAvan Thakkar <athakkar@redhat.com>
Mon, 18 Mar 2024 18:12:38 +0000 (23:42 +0530)
Fixes: https://tracker.ceph.com/issues/64970
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2
src/pybind/mgr/cephadm/tests/test_services.py

index bb0a8fcae518f45f51c682fa25d8b3ca22d8e66b..20745c3e8e2903068010b877bc9e3734b2814f24 100644 (file)
@@ -15,9 +15,10 @@ scrape_configs:
   - job_name: 'ceph'
     honor_labels: true
     static_configs:
-    - targets:
 {% for mgr in mgr_scrape_list %}
-      - '{{ mgr }}'
+    - targets: ['{{ mgr }}']
+      labels:
+        instance: 'ceph_cluster'
 {% endfor %}
 
 {% if nodes %}
index 9de22e3bf20f8f9dc113b1c88757b472b2ad310a..98574f53eba5496c67451f7eddacbededd112686 100644 (file)
@@ -476,8 +476,9 @@ class TestMonitoring:
                   - job_name: 'ceph'
                     honor_labels: true
                     static_configs:
-                    - targets:
-                      - '[::1]:9283'
+                    - targets: ['[::1]:9283']
+                      labels:
+                        instance: 'ceph_cluster'
 
                   - job_name: 'node'
                     static_configs: