]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
monitoring: improve hardware Grafana dashboard panels
authorAfreen Misbah <afreen@ibm.com>
Thu, 25 Jun 2026 18:58:53 +0000 (00:28 +0530)
committerAfreen Misbah <afreen@ibm.com>
Thu, 2 Jul 2026 08:50:08 +0000 (14:20 +0530)
- 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 <afreen@ibm.com>
monitoring/ceph-mixin/dashboards/hardware.libsonnet
monitoring/ceph-mixin/dashboards_out/hardware.json

index f3886e008cb5ab0132876b610a08417171dc1194..1fd0c02f0eeba4579cff858f67394c60c2648935 100644 (file)
@@ -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.*"})',
index 94db72377a3049b8832af3fb4d672bc96bc15881..b6afffb16fc2f4781b3968790d2c692d724e5ad3 100644 (file)
@@ -30,7 +30,7 @@
          "keepTime": true,
          "tags": [ ],
          "targetBlank": false,
-         "title": "Browse Dashboards",
+         "title": "Ceph Hardware - Overview",
          "tooltip": "",
          "type": "dashboards",
          "url": ""
                "type": "stat"
             },
             {
-               "colors": null,
                "datasource": "$datasource",
                "description": "",
                "fieldConfig": {
                   "defaults": {
+                     "links": [ ],
+                     "mappings": [ ],
                      "max": 100,
                      "min": 0,
                      "thresholds": {
                               "value": 85
                            }
                         ]
-                     }
+                     },
+                     "unit": "celsius"
                   }
                },
                "gridPos": {
                   "y": 1
                },
                "id": 4,
+               "interval": "1m",
                "links": [ ],
+               "maxDataPoints": 100,
                "options": {
-                  "colorMode": "none",
-                  "graphMode": "none",
-                  "justifyMode": "auto",
-                  "orientation": "horizontal",
                   "reduceOptions": {
                      "calcs": [
                         "lastNotNull"
                      "fields": "",
                      "values": false
                   },
-                  "textMode": "auto"
+                  "showThresholdLabels": false,
+                  "showThresholdMarkers": true
                },
                "pluginVersion": "9.1.3",
                "targets": [
                ],
                "title": "CPU Temp",
                "transparent": false,
-               "type": "stat"
+               "type": "gauge"
             },
             {
                "datasource": "$datasource",
                "id": 5,
                "options": {
                   "displayLabels": [
-                     "name"
+                     "name",
+                     "value"
                   ],
                   "legend": {
                      "calcs": [ ],
                      "displayMode": "table",
                      "placement": "bottom",
-                     "showLegend": false,
+                     "showLegend": true,
                      "values": [ ]
                   },
-                  "pieType": "pie",
+                  "pieType": "donut",
                   "reduceOptions": { },
                   "tooltip": { }
                },
                "id": 6,
                "options": {
                   "displayLabels": [
-                     "name"
+                     "name",
+                     "value"
                   ],
                   "legend": {
                      "calcs": [ ],
                      "displayMode": "table",
                      "placement": "bottom",
-                     "showLegend": false,
+                     "showLegend": true,
                      "values": [ ]
                   },
-                  "pieType": "pie",
+                  "pieType": "donut",
                   "reduceOptions": { },
                   "tooltip": { }
                },
                      "showLegend": true,
                      "values": [ ]
                   },
-                  "pieType": "pie",
+                  "pieType": "donut",
                   "reduceOptions": { },
                   "tooltip": { }
                },
                      "showLegend": true,
                      "values": [ ]
                   },
-                  "pieType": "pie",
+                  "pieType": "donut",
                   "reduceOptions": { },
                   "tooltip": { }
                },
                "type": "stat"
             },
             {
-               "colors": null,
                "datasource": "$datasource",
                "description": "",
                "fieldConfig": {
                   "defaults": {
+                     "links": [ ],
+                     "mappings": [ ],
                      "max": 85,
                      "min": 0,
                      "thresholds": {
                               "value": 80
                            }
                         ]
-                     }
+                     },
+                     "unit": "celsius"
                   }
                },
                "gridPos": {
                   "y": 5
                },
                "id": 11,
+               "interval": "1m",
                "links": [ ],
+               "maxDataPoints": 100,
                "options": {
-                  "colorMode": "none",
-                  "graphMode": "none",
-                  "justifyMode": "auto",
-                  "orientation": "horizontal",
                   "reduceOptions": {
                      "calcs": [
                         "lastNotNull"
                      "fields": "",
                      "values": false
                   },
-                  "textMode": "auto"
+                  "showThresholdLabels": false,
+                  "showThresholdMarkers": true
                },
                "pluginVersion": "9.1.3",
                "targets": [
                ],
                "title": "NVMe Temp",
                "transparent": false,
-               "type": "stat"
+               "type": "gauge"
             }
          ],
          "repeat": null,
                "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",
                "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",
                "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",
                "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",
                "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,
             "x": 0,
             "y": 2
          },
-         "id": 24,
+         "id": 26,
          "panels": [
             {
                "colors": null,
                         "mode": "absolute",
                         "steps": [ ]
                      },
-                     "unit": "short"
+                     "unit": "locale"
                   }
                },
                "gridPos": {
                   "x": 0,
                   "y": 3
                },
-               "id": 25,
+               "id": 27,
                "links": [ ],
                "maxPerRow": 6,
                "options": {
                         "mode": "absolute",
                         "steps": [ ]
                      },
-                     "unit": "short"
+                     "unit": "locale"
                   }
                },
                "gridPos": {
                   "x": 0,
                   "y": 8
                },
-               "id": 26,
+               "id": 28,
                "links": [ ],
                "options": {
                   "colorMode": "none",
                         "mode": "absolute",
                         "steps": [ ]
                      },
-                     "unit": "short"
+                     "unit": "locale"
                   }
                },
                "gridPos": {
                   "x": 4,
                   "y": 8
                },
-               "id": 27,
+               "id": 29,
                "links": [ ],
                "options": {
                   "colorMode": "none",
             "x": 0,
             "y": 3
          },
-         "id": 28,
+         "id": 30,
          "panels": [
             {
                "aliasColors": { },
                   "x": 0,
                   "y": 4
                },
-               "id": 29,
+               "id": 31,
                "legend": {
                   "alignAsTable": false,
                   "avg": false,
                   "x": 12,
                   "y": 4
                },
-               "id": 30,
+               "id": 32,
                "legend": {
                   "alignAsTable": false,
                   "avg": false,
                   "x": 0,
                   "y": 12
                },
-               "id": 31,
+               "id": 33,
                "legend": {
                   "alignAsTable": false,
                   "avg": false,
                   "x": 12,
                   "y": 12
                },
-               "id": 32,
+               "id": 34,
                "legend": {
                   "alignAsTable": false,
                   "avg": false,
             "x": 0,
             "y": 4
          },
-         "id": 33,
+         "id": 35,
          "panels": [
             {
                "aliasColors": { },
                   "x": 0,
                   "y": 5
                },
-               "id": 34,
+               "id": 36,
                "legend": {
                   "alignAsTable": false,
                   "avg": false,
                },
                "yaxes": [
                   {
-                     "format": "short",
+                     "format": "none",
                      "label": null,
                      "logBase": 1,
                      "max": null,
                      "show": true
                   },
                   {
-                     "format": "short",
+                     "format": "none",
                      "label": null,
                      "logBase": 1,
                      "max": null,
                   "x": 12,
                   "y": 5
                },
-               "id": 35,
+               "id": 37,
                "legend": {
                   "alignAsTable": false,
                   "avg": false,
                },
                "yaxes": [
                   {
-                     "format": "short",
+                     "format": "none",
                      "label": null,
                      "logBase": 1,
                      "max": null,
                      "show": true
                   },
                   {
-                     "format": "short",
+                     "format": "none",
                      "label": null,
                      "logBase": 1,
                      "max": null,
       ]
    },
    "timezone": "",
-   "title": "Ceph Hardware - Platform Monitoring",
+   "title": "Ceph Hardware - Overview",
    "uid": "hardware001",
    "version": 0
 }