Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
fix(mock): adjust backup time distribution for more realistic data
rcourtman5bc86a4cb18f
diff --git a/internal/mock/generator.go b/internal/mock/generator.goindex 859d49b278..0fee6dee70 100644--- a/internal/mock/generator.go+++ b/internal/mock/generator.go@@ -1963,24 +1963,24 @@ func generateGuestName(prefix string) string {}// generateLastBackupTime generates a realistic last backup timestamp.-// Distribution: 60% within 24h (fresh), 20% within 72h (stale), 10% older (critical), 10% never backed up+// Distribution: 70% within 24h (fresh), 15% within 72h (stale), 10% older (critical), 5% never backed upfunc generateLastBackupTime() time.Time {r := rand.Float64()now := time.Now()- if r < 0.10 {- // 10% never backed up - return zero time+ if r < 0.05 {+ // 5% never backed up - return zero timereturn time.Time{}- } else if r < 0.20 {+ } else if r < 0.15 {// 10% critical - backup 4-30 days agohoursAgo := 96 + rand.Intn(624) // 4-30 days in hoursreturn now.Add(-time.Duration(hoursAgo) * time.Hour)- } else if r < 0.40 {- // 20% stale - backup 24-72 hours ago+ } else if r < 0.30 {+ // 15% stale - backup 24-72 hours agohoursAgo := 24 + rand.Intn(48)return now.Add(-time.Duration(hoursAgo) * time.Hour)} else {- // 60% fresh - backup within last 24 hours+ // 70% fresh - backup within last 24 hourshoursAgo := rand.Intn(24)return now.Add(-time.Duration(hoursAgo) * time.Hour)}