From 83f5261528785cb086ce956eda3a01626e008408 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Mon, 16 Nov 2026 14:13:15 +0100 Subject: [PATCH] Add hardware temperature dashboard --- .../hardware-temperatures-dashboard.yaml | 57 +++++++++++++++++++ apps/grafana/resources/kustomization.yaml | 1 + 2 files changed, 58 insertions(+) create mode 100644 apps/grafana/resources/hardware-temperatures-dashboard.yaml diff --git a/apps/grafana/resources/hardware-temperatures-dashboard.yaml b/apps/grafana/resources/hardware-temperatures-dashboard.yaml new file mode 100644 index 0000000..48d78bf --- /dev/null +++ b/apps/grafana/resources/hardware-temperatures-dashboard.yaml @@ -0,0 +1,57 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: hardware-temperatures-dashboard + namespace: default + labels: + grafana_dashboard: "1" +data: + hardware-temperatures.json: |- + { + "annotations": {"list": []}, + "description": "Current hardware temperatures and history from node-exporter hwmon sensors. Includes CPU, NVMe, network adapters, motherboard and other kernel-exposed sensors.", + "editable": true, + "graphTooltip": 1, + "panels": [ + { + "datasource": {"type": "prometheus", "uid": "aevstx976yku8a"}, + "description": "Latest reading per sensor. Sensor and chip labels come from node-exporter; values may include sensors with no usable maximum threshold.", + "fieldConfig": {"defaults": {"unit": "celsius", "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 70}, {"color": "red", "value": 90}]}}, "overrides": []}, + "gridPos": {"h": 12, "w": 24, "x": 0, "y": 0}, + "id": 1, + "options": {"cellHeight": "sm", "showHeader": true, "sortBy": [{"desc": true, "displayName": "Temperature"}]}, + "targets": [{"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"}, "editorMode": "code", "expr": "(node_hwmon_temp_celsius{job=\"node-exporter\"} > 0) * on(instance,chip,sensor) group_left(label) node_hwmon_sensor_label{job=\"node-exporter\"} * on(instance,chip) group_left(chip_name) node_hwmon_chip_names{job=\"node-exporter\"} * on(instance) group_left(nodename) node_uname_info{job=\"node-exporter\"}", "instant": true, "legendFormat": "{{nodename}} / {{chip_name}} / {{label}}", "refId": "A"}], + "title": "Current temperatures by sensor", + "transformations": [{"id": "organize", "options": {"excludeByName": {"Time": true, "__name__": true, "container": true, "endpoint": true, "job": true, "namespace": true, "pod": true, "service": true}, "renameByName": {"Value": "Temperature", "instance": "Exporter"}}}], + "type": "table" + }, + { + "datasource": {"type": "prometheus", "uid": "aevstx976yku8a"}, + "fieldConfig": {"defaults": {"unit": "celsius", "custom": {"drawStyle": "line", "lineWidth": 1, "fillOpacity": 8, "showPoints": "never"}, "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 70}, {"color": "red", "value": 90}]}}, "overrides": []}, + "gridPos": {"h": 14, "w": 24, "x": 0, "y": 12}, + "id": 2, + "options": {"legend": {"displayMode": "table", "placement": "bottom", "showLegend": true}, "tooltip": {"mode": "multi", "sort": "desc"}}, + "targets": [{"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"}, "editorMode": "code", "expr": "(node_hwmon_temp_celsius{job=\"node-exporter\"} > 0) * on(instance,chip,sensor) group_left(label) node_hwmon_sensor_label{job=\"node-exporter\"} * on(instance,chip) group_left(chip_name) node_hwmon_chip_names{job=\"node-exporter\"} * on(instance) group_left(nodename) node_uname_info{job=\"node-exporter\"}", "legendFormat": "{{nodename}} / {{chip_name}} / {{label}}", "refId": "A"}], + "title": "Temperature history", + "type": "timeseries" + }, + { + "datasource": {"type": "influxdb", "uid": "aes16l4bz9xc0a"}, + "description": "SMART drive temperatures collected by Telegraf on arschrock, including SATA and NVMe devices.", + "fieldConfig": {"defaults": {"unit": "celsius", "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 45}, {"color": "red", "value": 55}]}}, "overrides": []}, + "gridPos": {"h": 10, "w": 24, "x": 0, "y": 26}, + "id": 3, + "options": {"cellHeight": "sm", "showHeader": true}, + "targets": [{"datasource": {"type": "influxdb", "uid": "aes16l4bz9xc0a"}, "query": "from(bucket: \"telegraf\")\n |> range(start: -1h)\n |> filter(fn: (r) => r._measurement == \"smart_device\" and r.host == \"arschrock\" and r._field == \"temp_c\")\n |> group(columns: [\"device\", \"model\"])\n |> last()\n |> group()\n |> keep(columns: [\"device\", \"model\", \"_value\"])\n |> sort(columns: [\"device\"])", "refId": "A"}], + "title": "SMART disk temperatures ยท arschrock", + "type": "table" + } + ], + "refresh": "30s", + "schemaVersion": 42, + "tags": ["hardware", "temperature"], + "time": {"from": "now-6h", "to": "now"}, + "title": "Hardware Temperatures", + "uid": "hardware-temperatures", + "version": 1 + } diff --git a/apps/grafana/resources/kustomization.yaml b/apps/grafana/resources/kustomization.yaml index 7aad981..be74c95 100644 --- a/apps/grafana/resources/kustomization.yaml +++ b/apps/grafana/resources/kustomization.yaml @@ -4,6 +4,7 @@ namespace: default resources: - ceph-rbd-pvc-capacity-dashboard.yaml - dahoam-disk-health-dashboard.yaml +- hardware-temperatures-dashboard.yaml - kubernetes-pvc-overview-dashboard.yaml - mikrotik-storage-dashboard.yaml configMapGenerator: