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
Metrics Data Flow (Sparklines vs History)
Quick summary
- Sparklines/trends toggle: client ring buffer + short-term in-memory server history via
/api/charts(fast, not durable). - Guest History tab: persistent SQLite metrics store via
/api/metrics-store/history(durable, long-range, downsampled).
Path A: Sparklines ("Trends" toggle)
- Server polling writes to in-memory history:
monitor.go->metricsHistory.AddGuestMetric/AddNodeMetric. /api/charts(handleCharts) reads frommetricsHistoryviamonitor.GetGuestMetrics/GetNodeMetrics.- Client toggles to sparklines:
metricsViewMode.ts->seedFromBackend()->ChartsAPI.getCharts()-> ring buffer inmetricsHistory.ts. - While in sparklines mode,
metricsSampler.tssamples websocket state every 30s and appends to the ring buffer; localStorage saves periodically.
Path B: Guest drawer History tab
- Server polling writes to SQLite store:
monitor.go->metricsStore.Write(resourceType, ...). /api/metrics-store/history(handleMetricsHistory) queriesmetrics.Store(Query/QueryAll) with tiered downsampling and license gating.GuestDrawerHistory charts callChartsAPI.getMetricsHistory()for CPU/memory/disk and ranges24h/7d/30d/90d.
Architecture notes
- In-memory retention is
NewMetricsHistory(1000, 24h)(monitor.go). At 10s polling, 1000 points covers ~2.8h of data. /api/chartsuses a two-tier strategy: ranges ≤ 2h are served from the in-memory buffer; longer ranges (4h, 8h, 24h, 7d, 30d) fall back to the SQLite persistent store with LTTB downsampling to ~500 points per metric.- Frontend sparkline ring buffer keeps up to 8h locally (
metricsHistory.ts). - Docker resource keys differ: in-memory uses
docker:<id>, persistent store usesresourceType=dockerContainer. TheGetGuestMetricsForChartmethod maps between these automatically. - History charts in the guest drawer use
/api/metrics-store/history(SQLite) for ranges24h/7d/30d/90d.