Monitor: 7 and 30 day views, traffic used, merged tiles

- ranges 7d (30 min step) and 30d (2 h step); Prometheus keeps 31d
- rate() window is at least the step, so long views show averages
  instead of a 2-minute sample; "now" values still use a 2m window
- overview returns used_down/used_up: increase() of the interface
  counters over the whole range
- tiles merged: traffic (with volume for the period), devices, load
This commit is contained in:
2026-10-17 21:36:51 +03:00
parent 2388a42275
commit 105f184a93
7 changed files with 218 additions and 47 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ const (
promDefaults = "/etc/default/prometheus"
promMarker = "# managed by forgetting"
promListen = "127.0.0.1:9090"
promRetention = "15d"
promRetention = "31d" // с запасом на вид «30 дней» во вкладке «Монитор»
)
func mlog(s string) { fmt.Println(" " + s) }