From 223c1363791981a35bcb3cac841e665e080cc1f5 Mon Sep 17 00:00:00 2001 From: Aashish Sharma Date: Fri, 28 Feb 2025 11:42:13 +0530 Subject: [PATCH] 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 --- monitoring/ceph-mixin/dashboards/host.libsonnet | 2 +- monitoring/ceph-mixin/dashboards_out/host-details.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monitoring/ceph-mixin/dashboards/host.libsonnet b/monitoring/ceph-mixin/dashboards/host.libsonnet index 9c8016ceffc..d31878545d5 100644 --- a/monitoring/ceph-mixin/dashboards/host.libsonnet +++ b/monitoring/ceph-mixin/dashboards/host.libsonnet @@ -354,7 +354,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 291b0edd6b8..5cd7b7cada8 100644 --- a/monitoring/ceph-mixin/dashboards_out/host-details.json +++ b/monitoring/ceph-mixin/dashboards_out/host-details.json @@ -136,7 +136,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": "", -- 2.47.3