Add upload/download ratio and period transfer panels to Transmission dashboard (#6)

## 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
This commit is contained in:
Erich Blume 2026-01-14 18:08:39 -08:00
commit 10012a4cf2

View file

@ -285,6 +285,149 @@
"title": "Total Uploaded", "title": "Total Uploaded",
"type": "stat" "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": { "datasource": {
"type": "prometheus", "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, "id": 7,
"options": { "options": {
"legend": { "legend": {
@ -436,7 +579,7 @@
}, },
"overrides": [] "overrides": []
}, },
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 4}, "gridPos": {"h": 8, "w": 12, "x": 12, "y": 8},
"id": 8, "id": 8,
"options": { "options": {
"legend": { "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, "id": 9,
"options": { "options": {
"legend": { "legend": {
@ -626,7 +769,7 @@
}, },
"overrides": [] "overrides": []
}, },
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 20}, "gridPos": {"h": 8, "w": 24, "x": 0, "y": 24},
"id": 10, "id": 10,
"options": { "options": {
"legend": { "legend": {