]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #56930 from adk3798/wip-65513-quincy
authorAdam King <47704447+adk3798@users.noreply.github.com>
Wed, 7 Aug 2024 13:13:46 +0000 (09:13 -0400)
committerGitHub <noreply@github.com>
Wed, 7 Aug 2024 13:13:46 +0000 (09:13 -0400)
quincy: mgr/dashboard: fix duplicate grafana panels when on mgr failover

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
1  2 
src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2
src/pybind/mgr/cephadm/tests/test_services.py

index 20745c3e8e2903068010b877bc9e3734b2814f24,a42df93d42c6c91fb61399a94ea777dd65564117..3dcfb0d8aa970eb7ad096a16a36fc7d4b51cc472
@@@ -14,11 -14,14 +14,15 @@@ 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 %}
 -      - '{{ mgr }}'
 +    - targets: ['{{ mgr }}']
 +      labels:
 +        instance: 'ceph_cluster'
  {% endfor %}
  
  {% if nodes %}
index 98574f53eba5496c67451f7eddacbededd112686,385a88345616a06ec33d7e6be5e2480ac989d91d..7fb38e4535536d754b482a43fbb17e1dfc0eca89
@@@ -475,10 -475,13 +475,14 @@@ 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'
 +                    - targets: ['[::1]:9283']
 +                      labels:
 +                        instance: 'ceph_cluster'
  
                    - job_name: 'node'
                      static_configs: