quincy: mgr/dashboard: fix duplicate grafana panels when on mgr failover
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
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 %}
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: