From: Afreen Misbah Date: Thu, 25 Jun 2026 18:58:53 +0000 (+0530) Subject: monitoring: improve hardware Grafana dashboard panels X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5dd6807e3187ba6792f69736b5e4d396832b1686;p=ceph.git monitoring: improve hardware Grafana dashboard panels - CPU/NVMe temp: change from stat to gauge panels with colored arc thresholds (green/yellow/red) and proper °C units - Health panels: wrap queries in max() aggregation to show single worst-case value instead of overlapping series - Pie charts: switch to donut style with visible legends - Fan RPM: use locale unit for comma formatting instead of short which auto-scaled to "K" - Fix temperature panels units - Add Device List and Platform Firmware table panels Fixes https://tracker.ceph.com/issues/77723 Signed-off-by: Afreen Misbah --- diff --git a/monitoring/ceph-mixin/dashboards/hardware.libsonnet b/monitoring/ceph-mixin/dashboards/hardware.libsonnet index f3886e008cb..1fd0c02f0ee 100644 --- a/monitoring/ceph-mixin/dashboards/hardware.libsonnet +++ b/monitoring/ceph-mixin/dashboards/hardware.libsonnet @@ -3,7 +3,7 @@ local g = import 'grafonnet/grafana.libsonnet'; (import 'utils.libsonnet') { 'hardware.json': $.dashboardSchema( - 'Ceph Hardware - Platform Monitoring', + 'Ceph Hardware - Overview', 'Comprehensive hardware monitoring with temperatures, fans, storage, and firmware from node-proxy', 'hardware001', 'now-1h', @@ -31,7 +31,7 @@ local g = import 'grafonnet/grafana.libsonnet'; keepTime=true, tags=[], targetBlank=false, - title='Browse Dashboards', + title='Ceph Hardware - Overview', tooltip='', type='dashboards', url='' @@ -101,27 +101,23 @@ local g = import 'grafonnet/grafana.libsonnet'; }, // CPU Temp - $.addStatPanel( + $.addGaugePanel( title='CPU Temp', unit='celsius', datasource='$datasource', - gridPosition={ h: 4, w: 3, x: 4, y: 1 } - ).addTarget($.addTargetSchema( + gridPosition={ h: 4, w: 3, x: 4, y: 1 }, + min=0, + max=100, + ) + .addThresholds([ + { color: 'green' }, + { color: '#EAB839', value: 75 }, + { color: 'red', value: 85 }, + ]) + .addTarget($.addTargetSchema( 'max(ceph_node_proxy_temperature_celsius{sensor_name=~".*CPU_TEMP"})', legendFormat='__auto' - )) - + { - fieldConfig: { - defaults: { - min: 0, - max: 100, - thresholds: { - mode: 'absolute', - steps: [{ color: 'green' }, { color: '#EAB839', value: 75 }, { color: 'red', value: 85 }], - }, - }, - }, - }, + )), // BMC Versions $.pieChartPanel( @@ -136,14 +132,13 @@ local g = import 'grafonnet/grafana.libsonnet'; + { fieldConfig+: { defaults+: { - color+: { - mode: 'palette-classic', - }, + color+: { mode: 'palette-classic' }, }, }, options+: { - legend+: { showLegend: false }, - displayLabels: ['name'], + pieType: 'donut', + legend+: { showLegend: true, placement: 'bottom' }, + displayLabels: ['name', 'value'], }, }, @@ -160,14 +155,13 @@ local g = import 'grafonnet/grafana.libsonnet'; + { fieldConfig+: { defaults+: { - color+: { - mode: 'palette-classic', - }, + color+: { mode: 'palette-classic' }, }, }, options+: { - legend+: { showLegend: false }, - displayLabels: ['name'], + pieType: 'donut', + legend+: { showLegend: true, placement: 'bottom' }, + displayLabels: ['name', 'value'], }, }, @@ -184,12 +178,11 @@ local g = import 'grafonnet/grafana.libsonnet'; + { fieldConfig+: { defaults+: { - color+: { - mode: 'palette-classic', - }, + color+: { mode: 'palette-classic' }, }, }, options+: { + pieType: 'donut', legend+: { showLegend: true, placement: 'right' }, displayLabels: ['value'], }, @@ -209,12 +202,11 @@ local g = import 'grafonnet/grafana.libsonnet'; + { fieldConfig+: { defaults+: { - color+: { - mode: 'palette-classic', - }, + color+: { mode: 'palette-classic' }, }, }, options+: { + pieType: 'donut', legend+: { showLegend: true, placement: 'right' }, displayLabels: ['value'], }, @@ -243,27 +235,23 @@ local g = import 'grafonnet/grafana.libsonnet'; )), // NVMe Temp - $.addStatPanel( + $.addGaugePanel( title='NVMe Temp', unit='celsius', datasource='$datasource', - gridPosition={ h: 4, w: 3, x: 4, y: 5 } - ).addTarget($.addTargetSchema( + gridPosition={ h: 4, w: 3, x: 4, y: 5 }, + min=0, + max=85, + ) + .addThresholds([ + { color: 'green' }, + { color: 'yellow', value: 75 }, + { color: 'red', value: 80 }, + ]) + .addTarget($.addTargetSchema( 'max(ceph_node_proxy_temperature_celsius{sensor_name=~"NVME.*_TEMP"})', legendFormat='__auto' - )) - + { - fieldConfig: { - defaults: { - min: 0, - max: 85, - thresholds: { - mode: 'absolute', - steps: [{ color: 'green' }, { color: 'yellow', value: 75 }, { color: 'red', value: 80 }], - }, - }, - }, - }, + )), ] }, // Row 2: Host Overview @@ -275,7 +263,7 @@ local g = import 'grafonnet/grafana.libsonnet'; datasource='$datasource', gridPosition={ h: 3, w: 2, x: 0, y: 2 } ).addTarget($.addTargetSchema( - 'ceph_node_proxy_health{hostname=~"$hostname",category="power"}', + 'max(ceph_node_proxy_health{hostname=~"$hostname",category="power"})', legendFormat='__auto' )) + { @@ -375,7 +363,7 @@ local g = import 'grafonnet/grafana.libsonnet'; datasource='$datasource', gridPosition={ h: 3, w: 2, x: 0, y: 5 } ).addTarget($.addTargetSchema( - 'ceph_node_proxy_health{hostname=~"$hostname",category="network"}', + 'max(ceph_node_proxy_health{hostname=~"$hostname",category="network"})', legendFormat='__auto' )) + { @@ -398,7 +386,7 @@ local g = import 'grafonnet/grafana.libsonnet'; datasource='$datasource', gridPosition={ h: 3, w: 2, x: 0, y: 8 } ).addTarget($.addTargetSchema( - 'ceph_node_proxy_health{hostname=~"$hostname",category="fans"}', + 'max(ceph_node_proxy_health{hostname=~"$hostname",category="fans"})', legendFormat='__auto' )) + { @@ -421,7 +409,7 @@ local g = import 'grafonnet/grafana.libsonnet'; datasource='$datasource', gridPosition={ h: 3, w: 2, x: 0, y: 11 } ).addTarget($.addTargetSchema( - 'ceph_node_proxy_health{hostname=~"$hostname",category="storage"}', + 'max(ceph_node_proxy_health{hostname=~"$hostname",category="storage"})', legendFormat='__auto' )) + { @@ -436,6 +424,89 @@ local g = import 'grafonnet/grafana.libsonnet'; }, options+: { colorMode: 'background_solid' }, }, + + // Device List + $.addTableExtended( + title='Device List', + datasource='$datasource', + gridPosition={ h: 8, w: 11, x: 2, y: 6 }, + options={ + footer: { show: false }, + showHeader: true, + }, + custom={ align: 'auto', cellOptions: { type: 'auto' }, filterable: false, inspect: false }, + thresholds={ + mode: 'absolute', + steps: [{ color: 'green', value: null }], + }, + ) + .addTarget($.addTargetSchema( + 'ceph_node_proxy_storage_capacity_bytes{hostname=~"$hostname"}', + legendFormat='__auto', + instant=true + ) + { format: 'table' }) + .addTransformations([ + { + id: 'organize', + options: { + excludeByName: { + Time: true, + Value: true, + __name__: true, + cluster: true, + hostname: true, + job: true, + instance: true, + }, + renameByName: { + device: 'Device Name', + model: 'Drive Model', + protocol: 'Protocol', + }, + }, + }, + ]), + + // Platform Firmware + $.addTableExtended( + title='Platform Firmware', + datasource='$datasource', + gridPosition={ h: 8, w: 11, x: 13, y: 6 }, + options={ + footer: { show: false }, + showHeader: true, + }, + custom={ align: 'auto', cellOptions: { type: 'auto' }, filterable: false, inspect: false }, + thresholds={ + mode: 'absolute', + steps: [{ color: 'green', value: null }], + }, + ) + .addTarget($.addTargetSchema( + 'ceph_node_proxy_firmware_info{hostname=~"$hostname"}', + legendFormat='__auto', + instant=true + ) + { format: 'table' }) + .addTransformations([ + { + id: 'organize', + options: { + excludeByName: { + Time: true, + Value: true, + __name__: true, + cluster: true, + hostname: true, + job: true, + instance: true, + }, + renameByName: { + component: 'Component', + version: 'Version', + }, + }, + }, + ]), ] }, // Row 3: FAN Speeds @@ -443,7 +514,7 @@ local g = import 'grafonnet/grafana.libsonnet'; // Repeating panel $.addStatPanel( title='FAN: $fan_speeds (RPM)', - unit='short', + unit='locale', datasource='$datasource', gridPosition={ h: 5, w: 4, x: 0, y: 3 } ).addTarget($.addTargetSchema( @@ -459,7 +530,7 @@ local g = import 'grafonnet/grafana.libsonnet'; // PSU1 $.addStatPanel( title='PSU1 Fan Speed (RPM)', - unit='short', + unit='locale', datasource='$datasource', gridPosition={ h: 5, w: 4, x: 0, y: 8 } ).addTarget($.addTargetSchema( @@ -470,7 +541,7 @@ local g = import 'grafonnet/grafana.libsonnet'; // PSU2 $.addStatPanel( title='PSU2 Fan Speed (RPM)', - unit='short', + unit='locale', datasource='$datasource', gridPosition={ h: 5, w: 4, x: 4, y: 8 } ).addTarget($.addTargetSchema( @@ -572,7 +643,7 @@ local g = import 'grafonnet/grafana.libsonnet'; g.graphPanel.new( title='AVG PSU Fan Speed', datasource='$datasource', - format='short', + format='none', ).addTarget( g.prometheus.target( 'avg(ceph_node_proxy_fan_rpm{hostname=~"$hostname", fan_name=~"PSU.*"})', @@ -588,7 +659,7 @@ local g = import 'grafonnet/grafana.libsonnet'; g.graphPanel.new( title='AVG Cooling Fan Speed', datasource='$datasource', - format='short', + format='none', ).addTarget( g.prometheus.target( 'avg(ceph_node_proxy_fan_rpm{hostname=~"$hostname", fan_name!~"PSU.*"})', diff --git a/monitoring/ceph-mixin/dashboards_out/hardware.json b/monitoring/ceph-mixin/dashboards_out/hardware.json index 94db72377a3..b6afffb16fc 100644 --- a/monitoring/ceph-mixin/dashboards_out/hardware.json +++ b/monitoring/ceph-mixin/dashboards_out/hardware.json @@ -30,7 +30,7 @@ "keepTime": true, "tags": [ ], "targetBlank": false, - "title": "Browse Dashboards", + "title": "Ceph Hardware - Overview", "tooltip": "", "type": "dashboards", "url": "" @@ -129,11 +129,12 @@ "type": "stat" }, { - "colors": null, "datasource": "$datasource", "description": "", "fieldConfig": { "defaults": { + "links": [ ], + "mappings": [ ], "max": 100, "min": 0, "thresholds": { @@ -151,7 +152,8 @@ "value": 85 } ] - } + }, + "unit": "celsius" } }, "gridPos": { @@ -161,12 +163,10 @@ "y": 1 }, "id": 4, + "interval": "1m", "links": [ ], + "maxDataPoints": 100, "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" @@ -174,7 +174,8 @@ "fields": "", "values": false }, - "textMode": "auto" + "showThresholdLabels": false, + "showThresholdMarkers": true }, "pluginVersion": "9.1.3", "targets": [ @@ -188,7 +189,7 @@ ], "title": "CPU Temp", "transparent": false, - "type": "stat" + "type": "gauge" }, { "datasource": "$datasource", @@ -218,16 +219,17 @@ "id": 5, "options": { "displayLabels": [ - "name" + "name", + "value" ], "legend": { "calcs": [ ], "displayMode": "table", "placement": "bottom", - "showLegend": false, + "showLegend": true, "values": [ ] }, - "pieType": "pie", + "pieType": "donut", "reduceOptions": { }, "tooltip": { } }, @@ -271,16 +273,17 @@ "id": 6, "options": { "displayLabels": [ - "name" + "name", + "value" ], "legend": { "calcs": [ ], "displayMode": "table", "placement": "bottom", - "showLegend": false, + "showLegend": true, "values": [ ] }, - "pieType": "pie", + "pieType": "donut", "reduceOptions": { }, "tooltip": { } }, @@ -333,7 +336,7 @@ "showLegend": true, "values": [ ] }, - "pieType": "pie", + "pieType": "donut", "reduceOptions": { }, "tooltip": { } }, @@ -386,7 +389,7 @@ "showLegend": true, "values": [ ] }, - "pieType": "pie", + "pieType": "donut", "reduceOptions": { }, "tooltip": { } }, @@ -508,11 +511,12 @@ "type": "stat" }, { - "colors": null, "datasource": "$datasource", "description": "", "fieldConfig": { "defaults": { + "links": [ ], + "mappings": [ ], "max": 85, "min": 0, "thresholds": { @@ -530,7 +534,8 @@ "value": 80 } ] - } + }, + "unit": "celsius" } }, "gridPos": { @@ -540,12 +545,10 @@ "y": 5 }, "id": 11, + "interval": "1m", "links": [ ], + "maxDataPoints": 100, "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" @@ -553,7 +556,8 @@ "fields": "", "values": false }, - "textMode": "auto" + "showThresholdLabels": false, + "showThresholdMarkers": true }, "pluginVersion": "9.1.3", "targets": [ @@ -567,7 +571,7 @@ ], "title": "NVMe Temp", "transparent": false, - "type": "stat" + "type": "gauge" } ], "repeat": null, @@ -658,7 +662,7 @@ "pluginVersion": "9.1.3", "targets": [ { - "expr": "ceph_node_proxy_health{hostname=~\"$hostname\",category=\"power\"}", + "expr": "max(ceph_node_proxy_health{hostname=~\"$hostname\",category=\"power\"})", "format": "time_series", "intervalFactor": 1, "legendFormat": "__auto", @@ -1102,7 +1106,7 @@ "pluginVersion": "9.1.3", "targets": [ { - "expr": "ceph_node_proxy_health{hostname=~\"$hostname\",category=\"network\"}", + "expr": "max(ceph_node_proxy_health{hostname=~\"$hostname\",category=\"network\"})", "format": "time_series", "intervalFactor": 1, "legendFormat": "__auto", @@ -1182,7 +1186,7 @@ "pluginVersion": "9.1.3", "targets": [ { - "expr": "ceph_node_proxy_health{hostname=~\"$hostname\",category=\"fans\"}", + "expr": "max(ceph_node_proxy_health{hostname=~\"$hostname\",category=\"fans\"})", "format": "time_series", "intervalFactor": 1, "legendFormat": "__auto", @@ -1262,7 +1266,7 @@ "pluginVersion": "9.1.3", "targets": [ { - "expr": "ceph_node_proxy_health{hostname=~\"$hostname\",category=\"storage\"}", + "expr": "max(ceph_node_proxy_health{hostname=~\"$hostname\",category=\"storage\"})", "format": "time_series", "intervalFactor": 1, "legendFormat": "__auto", @@ -1272,6 +1276,159 @@ "title": "Drives", "transparent": false, "type": "stat" + }, + { + "columns": [ ], + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ ] + }, + "gridPos": { + "h": 8, + "w": 11, + "x": 2, + "y": 6 + }, + "id": 24, + "links": [ ], + "options": { + "footer": { + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.1.3", + "styles": [ ], + "targets": [ + { + "expr": "ceph_node_proxy_storage_capacity_bytes{hostname=~\"$hostname\"}", + "format": "table", + "instant": true, + "intervalFactor": 1, + "legendFormat": "__auto", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Device List", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "__name__": true, + "cluster": true, + "hostname": true, + "instance": true, + "job": true + }, + "renameByName": { + "device": "Device Name", + "model": "Drive Model", + "protocol": "Protocol" + } + } + } + ], + "type": "table" + }, + { + "columns": [ ], + "datasource": "$datasource", + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ ] + }, + "gridPos": { + "h": 8, + "w": 11, + "x": 13, + "y": 6 + }, + "id": 25, + "links": [ ], + "options": { + "footer": { + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.1.3", + "styles": [ ], + "targets": [ + { + "expr": "ceph_node_proxy_firmware_info{hostname=~\"$hostname\"}", + "format": "table", + "instant": true, + "intervalFactor": 1, + "legendFormat": "__auto", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Platform Firmware", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "__name__": true, + "cluster": true, + "hostname": true, + "instance": true, + "job": true + }, + "renameByName": { + "component": "Component", + "version": "Version" + } + } + } + ], + "type": "table" } ], "repeat": null, @@ -1291,7 +1448,7 @@ "x": 0, "y": 2 }, - "id": 24, + "id": 26, "panels": [ { "colors": null, @@ -1306,7 +1463,7 @@ "mode": "absolute", "steps": [ ] }, - "unit": "short" + "unit": "locale" } }, "gridPos": { @@ -1315,7 +1472,7 @@ "x": 0, "y": 3 }, - "id": 25, + "id": 27, "links": [ ], "maxPerRow": 6, "options": { @@ -1361,7 +1518,7 @@ "mode": "absolute", "steps": [ ] }, - "unit": "short" + "unit": "locale" } }, "gridPos": { @@ -1370,7 +1527,7 @@ "x": 0, "y": 8 }, - "id": 26, + "id": 28, "links": [ ], "options": { "colorMode": "none", @@ -1413,7 +1570,7 @@ "mode": "absolute", "steps": [ ] }, - "unit": "short" + "unit": "locale" } }, "gridPos": { @@ -1422,7 +1579,7 @@ "x": 4, "y": 8 }, - "id": 27, + "id": 29, "links": [ ], "options": { "colorMode": "none", @@ -1470,7 +1627,7 @@ "x": 0, "y": 3 }, - "id": 28, + "id": 30, "panels": [ { "aliasColors": { }, @@ -1486,7 +1643,7 @@ "x": 0, "y": 4 }, - "id": 29, + "id": 31, "legend": { "alignAsTable": false, "avg": false, @@ -1573,7 +1730,7 @@ "x": 12, "y": 4 }, - "id": 30, + "id": 32, "legend": { "alignAsTable": false, "avg": false, @@ -1660,7 +1817,7 @@ "x": 0, "y": 12 }, - "id": 31, + "id": 33, "legend": { "alignAsTable": false, "avg": false, @@ -1747,7 +1904,7 @@ "x": 12, "y": 12 }, - "id": 32, + "id": 34, "legend": { "alignAsTable": false, "avg": false, @@ -1838,7 +1995,7 @@ "x": 0, "y": 4 }, - "id": 33, + "id": 35, "panels": [ { "aliasColors": { }, @@ -1855,7 +2012,7 @@ "x": 0, "y": 5 }, - "id": 34, + "id": 36, "legend": { "alignAsTable": false, "avg": false, @@ -1909,7 +2066,7 @@ }, "yaxes": [ { - "format": "short", + "format": "none", "label": null, "logBase": 1, "max": null, @@ -1917,7 +2074,7 @@ "show": true }, { - "format": "short", + "format": "none", "label": null, "logBase": 1, "max": null, @@ -1940,7 +2097,7 @@ "x": 12, "y": 5 }, - "id": 35, + "id": 37, "legend": { "alignAsTable": false, "avg": false, @@ -1994,7 +2151,7 @@ }, "yaxes": [ { - "format": "short", + "format": "none", "label": null, "logBase": 1, "max": null, @@ -2002,7 +2159,7 @@ "show": true }, { - "format": "short", + "format": "none", "label": null, "logBase": 1, "max": null, @@ -2136,7 +2293,7 @@ ] }, "timezone": "", - "title": "Ceph Hardware - Platform Monitoring", + "title": "Ceph Hardware - Overview", "uid": "hardware001", "version": 0 }