From 5856d835bab4d6505d63aa4e8a1dd2daa8a4a58d Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 31 Mar 2026 18:54:57 -0400 Subject: [PATCH] grafana: qbt smoothing --- services/monitoring.nix | 103 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 100 insertions(+), 3 deletions(-) diff --git a/services/monitoring.nix b/services/monitoring.nix index 3031018..f63549e 100644 --- a/services/monitoring.nix +++ b/services/monitoring.nix @@ -497,6 +497,18 @@ let legendFormat = "Upload"; refId = "B"; } + { + datasource = promDs; + expr = "avg_over_time(qbittorrent_download_bytes_per_second[10m:])"; + legendFormat = "Download (10m avg)"; + refId = "C"; + } + { + datasource = promDs; + expr = "avg_over_time(qbittorrent_upload_bytes_per_second[10m:])"; + legendFormat = "Upload (10m avg)"; + refId = "D"; + } ]; fieldConfig = { defaults = { @@ -504,12 +516,97 @@ let min = 0; color.mode = "palette-classic"; custom = { - lineWidth = 2; - fillOpacity = 15; + lineWidth = 1; + fillOpacity = 10; spanNulls = true; }; }; - overrides = [ ]; + overrides = [ + { + matcher = { + id = "byFrameRefID"; + options = "A"; + }; + properties = [ + { + id = "color"; + value = { + fixedColor = "green"; + mode = "fixed"; + }; + } + { + id = "custom.fillOpacity"; + value = 5; + } + ]; + } + { + matcher = { + id = "byFrameRefID"; + options = "B"; + }; + properties = [ + { + id = "color"; + value = { + fixedColor = "blue"; + mode = "fixed"; + }; + } + { + id = "custom.fillOpacity"; + value = 5; + } + ]; + } + { + matcher = { + id = "byFrameRefID"; + options = "C"; + }; + properties = [ + { + id = "color"; + value = { + fixedColor = "green"; + mode = "fixed"; + }; + } + { + id = "custom.lineWidth"; + value = 3; + } + { + id = "custom.fillOpacity"; + value = 0; + } + ]; + } + { + matcher = { + id = "byFrameRefID"; + options = "D"; + }; + properties = [ + { + id = "color"; + value = { + fixedColor = "blue"; + mode = "fixed"; + }; + } + { + id = "custom.lineWidth"; + value = 3; + } + { + id = "custom.fillOpacity"; + value = 0; + } + ]; + } + ]; }; }