From: Aashish Sharma Date: Fri, 28 Feb 2025 06:12:13 +0000 (+0530) Subject: monitoring: Fix OSDs panel in host-details grafana dashboard X-Git-Tag: v19.2.3~231^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bb5d0b7d2bf741ed1b4434eeba7be37bf47d7553;p=ceph.git monitoring: Fix OSDs panel in host-details grafana dashboard OSDs panel in host-details grafana dashboard shows total of all OSDs across all hosts even if a particular host is selected from the ceph_hosts filter. This PR intends to fix this issue Fixes: https://tracker.ceph.com/issues/70226 Signed-off-by: Aashish Sharnma (cherry picked from commit 223c1363791981a35bcb3cac841e665e080cc1f5) --- diff --git a/monitoring/ceph-mixin/dashboards/host.libsonnet b/monitoring/ceph-mixin/dashboards/host.libsonnet index 5796e2d698183..b610acd1b8b4a 100644 --- a/monitoring/ceph-mixin/dashboards/host.libsonnet +++ b/monitoring/ceph-mixin/dashboards/host.libsonnet @@ -336,7 +336,7 @@ local g = import 'grafonnet/grafana.libsonnet'; 'OSDs', '', 'current', - 'count(sum by (ceph_daemon) (ceph_osd_metadata{%(matchers)s}))' % $.matchers(), + 'count(sum by (ceph_daemon) (ceph_osd_metadata{%(matchers)s hostname=~"$ceph_hosts"}))' % $.matchers(), null, 'time_series', 0, diff --git a/monitoring/ceph-mixin/dashboards_out/host-details.json b/monitoring/ceph-mixin/dashboards_out/host-details.json index f7f5c3e4a1fe9..4803dab40165a 100644 --- a/monitoring/ceph-mixin/dashboards_out/host-details.json +++ b/monitoring/ceph-mixin/dashboards_out/host-details.json @@ -123,7 +123,7 @@ "tableColumn": "", "targets": [ { - "expr": "count(sum by (ceph_daemon) (ceph_osd_metadata{cluster=~\"$cluster\", }))", + "expr": "count(sum by (ceph_daemon) (ceph_osd_metadata{cluster=~\"$cluster\", hostname=~\"$ceph_hosts\"}))", "format": "time_series", "intervalFactor": 1, "legendFormat": "",