From 004e1f2aef4ad9e8efb1d76c82bb74ada9a6d363 Mon Sep 17 00:00:00 2001 From: Piyush Agarwal Date: Thu, 2 Jan 2025 14:22:03 +0530 Subject: [PATCH] mgr/dashboard: Changing SimpleGraphPanel to TimeSeries Panel in cephfs.libsonnet Tracker:- https://tracker.ceph.com/issues/69404 Signed-off-by: Piyush Agarwal (cherry picked from commit 1772dc1cdf0a5fd47bf4954c343b18f70d357304) --- .../ceph-mixin/dashboards/cephfs.libsonnet | 64 ++--- .../dashboards/timeseries_panel.libsonnet | 8 +- .../dashboards_out/cephfs-overview.json | 232 ++++++++---------- 3 files changed, 139 insertions(+), 165 deletions(-) diff --git a/monitoring/ceph-mixin/dashboards/cephfs.libsonnet b/monitoring/ceph-mixin/dashboards/cephfs.libsonnet index 11548ef2a9d36..8d386e0df19d5 100644 --- a/monitoring/ceph-mixin/dashboards/cephfs.libsonnet +++ b/monitoring/ceph-mixin/dashboards/cephfs.libsonnet @@ -47,40 +47,42 @@ local g = import 'grafonnet/grafana.libsonnet'; ) .addPanels([ $.addRowSchema(false, true, 'MDS Performance') + { gridPos: { x: 0, y: 0, w: 24, h: 1 } }, - $.simpleGraphPanel( - {}, - 'MDS Workload - $mds_servers', - '', - 'none', - 'Reads(-) / Writes (+)', - 0, - 'sum(rate(ceph_objecter_op_r{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(), - 'Read Ops', - 0, - 1, - 12, - 9 + $.timeSeriesPanel( + title='MDS Workload - $mds_servers', + datasource='$datasource', + gridPosition={ x: 0, y: 1, w: 12, h: 9 }, + axisLabel='Reads(-) / Writes (+)', + showPoints='never', + min=0, + spanNulls=true, ) - .addTarget($.addTargetSchema( - 'sum(rate(ceph_objecter_op_w{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(), - 'Write Ops' - )) + .addTargets([ + $.addTargetSchema( + 'sum(rate(ceph_objecter_op_r{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(), + 'Read Ops' + ), + $.addTargetSchema( + 'sum(rate(ceph_objecter_op_w{ceph_daemon=~"($mds_servers).*", %(matchers)s}[$__rate_interval]))' % $.matchers(), + 'Write Ops' + ), + ]) .addSeriesOverride( { alias: '/.*Reads/', transform: 'negative-Y' } ), - $.simpleGraphPanel( - {}, - 'Client Request Load - $mds_servers', - '', - 'none', - 'Client Requests', - 0, - 'ceph_mds_server_handle_client_request{ceph_daemon=~"($mds_servers).*", %(matchers)s}' % $.matchers(), - '{{ceph_daemon}}', - 12, - 1, - 12, - 9 - ), + $.timeSeriesPanel( + title='Client Request Load - $mds_servers', + datasource='$datasource', + gridPosition={ x: 12, y: 1, w: 12, h: 9 }, + axisLabel='Client Requests', + showPoints='never', + min=0, + spanNulls=true, + ) + .addTargets([ + $.addTargetSchema( + 'ceph_mds_server_handle_client_request{ceph_daemon=~"($mds_servers).*", %(matchers)s}' % $.matchers(), + '{{ceph_daemon}}' + ), + ]), ]), } diff --git a/monitoring/ceph-mixin/dashboards/timeseries_panel.libsonnet b/monitoring/ceph-mixin/dashboards/timeseries_panel.libsonnet index 7da147cf56804..6cd7e70a42eaf 100644 --- a/monitoring/ceph-mixin/dashboards/timeseries_panel.libsonnet +++ b/monitoring/ceph-mixin/dashboards/timeseries_panel.libsonnet @@ -20,10 +20,10 @@ axisPlacement='auto', barAlignment=0, drawStyle='line', - fillOpacity=0, + fillOpacity=8, gradientMode='none', lineInterpolation='linear', - lineWidth=0, + lineWidth=1, pointSize=0, scaleDistributionType='linear', showPoints='', @@ -94,6 +94,7 @@ }, overrides: [], }, + seriesOverrides: [], options: { legend: { calcs: [], @@ -137,5 +138,8 @@ addThresholds(steps):: std.foldl(function(p, s) p.addThreshold(s), steps, self), addCalcs(calcs):: std.foldl(function(p, t) p.addCalc(t), calcs, self), addOverrides(overrides):: std.foldl(function(p, o) p.addOverride(o.matcher, o.properties), overrides, self), + addSeriesOverride(override):: self { + seriesOverrides+: [override], + }, }, } diff --git a/monitoring/ceph-mixin/dashboards_out/cephfs-overview.json b/monitoring/ceph-mixin/dashboards_out/cephfs-overview.json index f65ce4da613dd..7f4b9e83b2e6b 100644 --- a/monitoring/ceph-mixin/dashboards_out/cephfs-overview.json +++ b/monitoring/ceph-mixin/dashboards_out/cephfs-overview.json @@ -57,23 +57,51 @@ "type": "row" }, { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": "$datasource", - "description": "", "fieldConfig": { "defaults": { + "color": { + "mode": "palette-classic" + }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Reads(-) / Writes (+)", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", "fillOpacity": 8, - "showPoints": "never" + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 0, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ ] }, "unit": "none" - } + }, + "overrides": [ ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 12, @@ -81,36 +109,25 @@ "y": 1 }, "id": 3, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sideWidth": null, - "total": false, - "values": false + "options": { + "legend": { + "calcs": [ ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, + "pluginVersion": "9.1.3", "seriesOverrides": [ { "alias": "/.*Reads/", "transform": "negative-Y" } ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { "expr": "sum(rate(ceph_objecter_op_r{ceph_daemon=~\"($mds_servers).*\", cluster=~\"$cluster\", }[$__rate_interval]))", @@ -127,60 +144,55 @@ "refId": "B" } ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, "title": "MDS Workload - $mds_servers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "timeseries", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "none", - "label": "Reads(-) / Writes (+)", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] + "type": "timeseries" }, { - "aliasColors": { }, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": "$datasource", - "description": "", "fieldConfig": { "defaults": { + "color": { + "mode": "palette-classic" + }, "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Client Requests", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", "fillOpacity": 8, - "showPoints": "never" + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 0, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ ] }, "unit": "none" - } + }, + "overrides": [ ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 12, @@ -188,31 +200,20 @@ "y": 1 }, "id": 4, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sideWidth": null, - "total": false, - "values": false + "options": { + "legend": { + "calcs": [ ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "lines": true, - "linewidth": 1, - "links": [ ], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, + "pluginVersion": "9.1.3", "seriesOverrides": [ ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { "expr": "ceph_mds_server_handle_client_request{ceph_daemon=~\"($mds_servers).*\", cluster=~\"$cluster\", }", @@ -222,41 +223,8 @@ "refId": "A" } ], - "thresholds": [ ], - "timeFrom": null, - "timeShift": null, "title": "Client Request Load - $mds_servers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "timeseries", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [ ] - }, - "yaxes": [ - { - "format": "none", - "label": "Client Requests", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ] + "type": "timeseries" } ], "refresh": "30s", -- 2.47.3