]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: many-to-many Prometheus error 37792/head
authorPatrick Seidensal <pseidensal@suse.com>
Mon, 26 Oct 2020 11:53:17 +0000 (12:53 +0100)
committerPatrick Seidensal <pseidensal@suse.com>
Mon, 26 Oct 2020 11:53:17 +0000 (12:53 +0100)
Fix configuration created by cephadm to prevent any "many-to-many
matching not allowed: matching labels must be unique on one side"
issues. The mgr/prometheus exporter exports suitable instance labels
itself, which can be taken over when `honor_labels` in Prometheus is set
to `true`.

Fixes: https://tracker.ceph.com/issues/47997
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2

index 0ea8101df6d0a5e4a21742c72851de9d5754d681..26af6db012d1e2fdd6bd19953b78dd9a2bd2f2c3 100644 (file)
@@ -14,13 +14,12 @@ alerting:
 {% endif %}
 scrape_configs:
   - job_name: 'ceph'
+    honor_labels: true
     static_configs:
     - targets:
 {% for mgr in mgr_scrape_list %}
       - '{{ mgr }}'
 {% endfor %}
-      labels:
-        instance: 'ceph_cluster'
 {% if nodes %}
   - job_name: 'node'
     static_configs: