]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
monitoring: Fix OSDs panel in host-details grafana dashboard 62625/head
authorAashish Sharma <Aashish.Sharma1@ibm.com>
Fri, 28 Feb 2025 06:12:13 +0000 (11:42 +0530)
committerAashish Sharma <Aashish.Sharma1@ibm.com>
Wed, 2 Apr 2025 06:42:34 +0000 (12:12 +0530)
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 <aasharma@redhat.com>
(cherry picked from commit 223c1363791981a35bcb3cac841e665e080cc1f5)

monitoring/ceph-mixin/dashboards/host.libsonnet
monitoring/ceph-mixin/dashboards_out/host-details.json

index 5796e2d69818333434be8472ef0904d38837ddf5..b610acd1b8b4ab9fe0f7a99b212d31a00ab4eccd 100644 (file)
@@ -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,
index f7f5c3e4a1fe990491614cb5576bbf27002b857a..4803dab40165ad741540e9fae9d158f6c8c6775d 100644 (file)
          "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": "",