From 9c026fa18cf9390401e930e30d4dbf85d35340c3 Mon Sep 17 00:00:00 2001 From: Nobuto Murata Date: Thu, 2 Nov 2023 13:33:07 +0900 Subject: [PATCH] mgr/dashboard: info on why RBD graphs are empty Those RBD IO statistics graphs are empty out of the box and it's on purpose. Instead of giving an impression that those graphs are broken, point users to a documentation explaining about optional steps to enable those statistics. https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics Signed-off-by: Nobuto Murata --- .../ceph-mixin/dashboards/rbd.libsonnet | 29 +++++++++++++++---- .../dashboards_out/rbd-details.json | 6 ++-- .../dashboards_out/rbd-overview.json | 12 ++++---- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/monitoring/ceph-mixin/dashboards/rbd.libsonnet b/monitoring/ceph-mixin/dashboards/rbd.libsonnet index 709d4e04f7e..8ae9d272e50 100644 --- a/monitoring/ceph-mixin/dashboards/rbd.libsonnet +++ b/monitoring/ceph-mixin/dashboards/rbd.libsonnet @@ -1,12 +1,22 @@ local g = import 'grafonnet/grafana.libsonnet'; local u = import 'utils.libsonnet'; +local info_rbd_stats = std.join( + '', + [ + 'RBD per-image IO statistics are disabled by default.\n\n', + 'Please refer to ', + 'https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics ', + 'for information about how to enable those optionally.', + ] +); + (import 'utils.libsonnet') { 'rbd-details.json': - local RbdDetailsPanel(title, formatY1, expr1, expr2, x, y, w, h) = + local RbdDetailsPanel(title, description, formatY1, expr1, expr2, x, y, w, h) = $.graphPanelSchema({}, title, - '', + description, 'null as zero', false, formatY1, @@ -83,6 +93,7 @@ local u = import 'utils.libsonnet'; .addPanels([ RbdDetailsPanel( 'IOPS', + info_rbd_stats, 'iops', 'rate(ceph_rbd_write_ops{%(matchers)s, pool="$pool", image="$image"}[$__rate_interval])' % $.matchers() , @@ -94,6 +105,7 @@ local u = import 'utils.libsonnet'; ), RbdDetailsPanel( 'Throughput', + info_rbd_stats, 'Bps', 'rate(ceph_rbd_write_bytes{%(matchers)s, pool="$pool", image="$image"}[$__rate_interval])' % $.matchers(), 'rate(ceph_rbd_read_bytes{%(matchers)s, pool="$pool", image="$image"}[$__rate_interval])' % $.matchers(), @@ -104,6 +116,7 @@ local u = import 'utils.libsonnet'; ), RbdDetailsPanel( 'Average Latency', + info_rbd_stats, 'ns', ||| rate(ceph_rbd_write_latency_sum{%(matchers)s, pool="$pool", image="$image"}[$__rate_interval]) / @@ -121,6 +134,7 @@ local u = import 'utils.libsonnet'; ]), 'rbd-overview.json': local RbdOverviewPanel(title, + description, formatY1, expr1, expr2, @@ -132,7 +146,7 @@ local u = import 'utils.libsonnet'; h) = $.graphPanelSchema({}, title, - '', + description, 'null as zero', false, formatY1, @@ -196,6 +210,7 @@ local u = import 'utils.libsonnet'; .addPanels([ RbdOverviewPanel( 'IOPS', + info_rbd_stats, 'short', 'round(sum(rate(ceph_rbd_write_ops{%(matchers)s}[$__rate_interval])))' % $.matchers(), 'round(sum(rate(ceph_rbd_read_ops{%(matchers)s}[$__rate_interval])))' % $.matchers(), @@ -208,6 +223,7 @@ local u = import 'utils.libsonnet'; ), RbdOverviewPanel( 'Throughput', + info_rbd_stats, 'Bps', 'round(sum(rate(ceph_rbd_write_bytes{%(matchers)s}[$__rate_interval])))' % $.matchers(), 'round(sum(rate(ceph_rbd_read_bytes{%(matchers)s}[$__rate_interval])))' % $.matchers(), @@ -220,6 +236,7 @@ local u = import 'utils.libsonnet'; ), RbdOverviewPanel( 'Average Latency', + info_rbd_stats, 'ns', ||| round( @@ -242,7 +259,7 @@ local u = import 'utils.libsonnet'; ), $.addTableSchema( '$datasource', - '', + info_rbd_stats, { col: 3, desc: true }, [ $.overviewStyle('Pool', 'pool', 'string', 'short'), @@ -273,7 +290,7 @@ local u = import 'utils.libsonnet'; ) + { gridPos: { x: 0, y: 7, w: 8, h: 7 } }, $.addTableSchema( '$datasource', - '', + info_rbd_stats, { col: 3, desc: true }, [ $.overviewStyle('Pool', 'pool', 'string', 'short'), @@ -304,7 +321,7 @@ local u = import 'utils.libsonnet'; ) + { gridPos: { x: 8, y: 7, w: 8, h: 7 } }, $.addTableSchema( '$datasource', - '', + info_rbd_stats, { col: 3, desc: true }, [ $.overviewStyle('Pool', 'pool', 'string', 'short'), diff --git a/monitoring/ceph-mixin/dashboards_out/rbd-details.json b/monitoring/ceph-mixin/dashboards_out/rbd-details.json index f64de312af5..2d5d4ecac4a 100644 --- a/monitoring/ceph-mixin/dashboards_out/rbd-details.json +++ b/monitoring/ceph-mixin/dashboards_out/rbd-details.json @@ -43,7 +43,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "", + "description": "RBD per-image IO statistics are disabled by default.\n\nPlease refer to https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics for information about how to enable those optionally.", "fill": 1, "fillGradient": 0, "gridPos": { @@ -136,7 +136,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "", + "description": "RBD per-image IO statistics are disabled by default.\n\nPlease refer to https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics for information about how to enable those optionally.", "fill": 1, "fillGradient": 0, "gridPos": { @@ -229,7 +229,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "", + "description": "RBD per-image IO statistics are disabled by default.\n\nPlease refer to https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics for information about how to enable those optionally.", "fill": 1, "fillGradient": 0, "gridPos": { diff --git a/monitoring/ceph-mixin/dashboards_out/rbd-overview.json b/monitoring/ceph-mixin/dashboards_out/rbd-overview.json index 86b354a6089..c367bd16fa3 100644 --- a/monitoring/ceph-mixin/dashboards_out/rbd-overview.json +++ b/monitoring/ceph-mixin/dashboards_out/rbd-overview.json @@ -55,7 +55,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "", + "description": "RBD per-image IO statistics are disabled by default.\n\nPlease refer to https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics for information about how to enable those optionally.", "fill": 1, "fillGradient": 0, "gridPos": { @@ -148,7 +148,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "", + "description": "RBD per-image IO statistics are disabled by default.\n\nPlease refer to https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics for information about how to enable those optionally.", "fill": 1, "fillGradient": 0, "gridPos": { @@ -241,7 +241,7 @@ "dashLength": 10, "dashes": false, "datasource": "$datasource", - "description": "", + "description": "RBD per-image IO statistics are disabled by default.\n\nPlease refer to https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics for information about how to enable those optionally.", "fill": 1, "fillGradient": 0, "gridPos": { @@ -331,7 +331,7 @@ { "columns": [ ], "datasource": "$datasource", - "description": "", + "description": "RBD per-image IO statistics are disabled by default.\n\nPlease refer to https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics for information about how to enable those optionally.", "gridPos": { "h": 7, "w": 8, @@ -433,7 +433,7 @@ { "columns": [ ], "datasource": "$datasource", - "description": "", + "description": "RBD per-image IO statistics are disabled by default.\n\nPlease refer to https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics for information about how to enable those optionally.", "gridPos": { "h": 7, "w": 8, @@ -535,7 +535,7 @@ { "columns": [ ], "datasource": "$datasource", - "description": "", + "description": "RBD per-image IO statistics are disabled by default.\n\nPlease refer to https://docs.ceph.com/en/latest/mgr/prometheus/#rbd-io-statistics for information about how to enable those optionally.", "gridPos": { "h": 7, "w": 8, -- 2.39.5