]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
monitoring: Fix OSDs panel in host-details grafana dashboard 62047/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, 19 Mar 2025 05:20:00 +0000 (10:50 +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>
monitoring/ceph-mixin/dashboards/host.libsonnet
monitoring/ceph-mixin/dashboards_out/host-details.json

index 9c8016ceffc9d4ba792f66992a0b37c5570c69a7..d31878545d54dc6f86e5dc743ae57d579b991e42 100644 (file)
@@ -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,
index 291b0edd6b8820e316c800240cc6bb5c0dd69fbf..5cd7b7cada89915e3e15190f0b410085d635e9bc 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": "",