From ea8a3aca02f2adc1e68a055ab95ced207da1561a Mon Sep 17 00:00:00 2001 From: Patrick Seidensal Date: Mon, 26 Oct 2020 12:53:17 +0100 Subject: [PATCH] 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 --- .../cephadm/templates/services/prometheus/prometheus.yml.j2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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: -- 2.47.3