Add persistent thresholds and seven-day metrics history

This commit is contained in:
maxim
2026-07-31 21:32:55 +03:00
parent ec20550c3b
commit 99dc3b76d0
12 changed files with 490 additions and 42 deletions

View File

@@ -8,7 +8,7 @@ func TestEvaluateAlerts(t *testing.T) {
Storage: StorageMetrics{UsagePercent: 96},
Backups: BackupMetrics{}, Guests: GuestsMetrics{},
}
alerts := evaluateAlerts(metrics)
alerts := evaluateAlerts(metrics, defaultThresholds())
if len(alerts) != 2 {
t.Fatalf("ожидалось два уведомления, получено: %+v", alerts)
}