From 10012a4cf2720a7ddc385934d3cadef47ecaa465 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Wed, 14 Jan 2026 18:08:39 -0800 Subject: [PATCH] Add upload/download ratio and period transfer panels to Transmission dashboard (#6) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Adds Upload/Download Ratio stat panel with color thresholds (red < 0.5, yellow < 1, green >= 1) - Adds Downloaded (Period) stat panel showing bytes downloaded in selected time range - Adds Uploaded (Period) stat panel showing bytes uploaded in selected time range Uses PromQL `increase()` on existing counter metrics - no new metrics collection needed. ## Test plan - [x] Deployed to indri via `mise run provision-indri` - [x] Grafana restarted successfully 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: https://forge.tail8d86e.ts.net/eblume/blumeops/pulls/6 --- .../files/dashboards/transmission.json | 151 +++++++++++++++++- 1 file changed, 147 insertions(+), 4 deletions(-) diff --git a/ansible/roles/grafana/files/dashboards/transmission.json b/ansible/roles/grafana/files/dashboards/transmission.json index 89c516d..85e5eeb 100644 --- a/ansible/roles/grafana/files/dashboards/transmission.json +++ b/ansible/roles/grafana/files/dashboards/transmission.json @@ -285,6 +285,149 @@ "title": "Total Uploaded", "type": "stat" }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + {"color": "red", "value": null}, + {"color": "yellow", "value": 0.5}, + {"color": "green", "value": 1} + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": {"h": 4, "w": 8, "x": 0, "y": 4}, + "id": 11, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": {"type": "prometheus", "uid": "prometheus"}, + "expr": "increase(transmission_uploaded_bytes_total[$__range]) / increase(transmission_downloaded_bytes_total[$__range])", + "refId": "A" + } + ], + "title": "Upload/Download Ratio (Period)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + {"color": "green", "value": null} + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": {"h": 4, "w": 8, "x": 8, "y": 4}, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": {"type": "prometheus", "uid": "prometheus"}, + "expr": "increase(transmission_downloaded_bytes_total[$__range])", + "refId": "A" + } + ], + "title": "Downloaded (Period)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + {"color": "blue", "value": null} + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": {"h": 4, "w": 8, "x": 16, "y": 4}, + "id": 13, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "10.0.0", + "targets": [ + { + "datasource": {"type": "prometheus", "uid": "prometheus"}, + "expr": "increase(transmission_uploaded_bytes_total[$__range])", + "refId": "A" + } + ], + "title": "Uploaded (Period)", + "type": "stat" + }, { "datasource": { "type": "prometheus", @@ -351,7 +494,7 @@ } ] }, - "gridPos": {"h": 8, "w": 12, "x": 0, "y": 4}, + "gridPos": {"h": 8, "w": 12, "x": 0, "y": 8}, "id": 7, "options": { "legend": { @@ -436,7 +579,7 @@ }, "overrides": [] }, - "gridPos": {"h": 8, "w": 12, "x": 12, "y": 4}, + "gridPos": {"h": 8, "w": 12, "x": 12, "y": 8}, "id": 8, "options": { "legend": { @@ -540,7 +683,7 @@ } ] }, - "gridPos": {"h": 8, "w": 24, "x": 0, "y": 12}, + "gridPos": {"h": 8, "w": 24, "x": 0, "y": 16}, "id": 9, "options": { "legend": { @@ -626,7 +769,7 @@ }, "overrides": [] }, - "gridPos": {"h": 8, "w": 24, "x": 0, "y": 20}, + "gridPos": {"h": 8, "w": 24, "x": 0, "y": 24}, "id": 10, "options": { "legend": {