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: v20.3.0~201^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=223c1363791981a35bcb3cac841e665e080cc1f5;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 --- diff --git a/monitoring/ceph-mixin/dashboards/host.libsonnet b/monitoring/ceph-mixin/dashboards/host.libsonnet index 9c8016ceffc9..d31878545d54 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 291b0edd6b88..5cd7b7cada89 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": "",