From: Patrick Seidensal Date: Mon, 26 Oct 2020 11:53:17 +0000 (+0100) Subject: mgr/cephadm: many-to-many Prometheus error X-Git-Tag: v16.1.0~667^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ea8a3aca02f2adc1e68a055ab95ced207da1561a;p=ceph.git mgr/cephadm: many-to-many Prometheus error 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 --- diff --git a/src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2 b/src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2 index 0ea8101df6d0..26af6db012d1 100644 --- a/src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2 +++ b/src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2 @@ -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: