You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In-memory thread-safe circular metric buffer (ContainerSeries) sampling active container memory and CPU points up to configurable capacities with automatic eviction.
Robust Ordinary Least Squares (OLS) linear regression modeling time vs memory utilization with numerical stability guards against zero-variance divisions.
Mathematical calculation of consumption slope ($m$, bytes/sec), intercept ($c$), coefficient of determination ($R^2$), and dynamic Time-to-Exhaustion (TTE) prediction.
Multi-tier risk classification: critical_oom_imminent (exhaustion < 120s or usage > 92%), warning (exhaustion < 300s or growth rate > 10 MB/s), moderate_growth, and stable.
Early-Warning OOM Alert System (internal/anomaly/alarm.go, internal/anomaly/detector.go):
Automated early warning alarm dispatch triggering before kernel OOM killer (exit 137) terminates containers.
Non-blocking webhook dispatch bridge into Discord and Slack notification channels via alert.Dispatcher with timeout-bounded context execution.
Incident event deduplication with configurable cooldown periods to prevent alert fatigue.
GET /api/anomaly/predictions: Returns current linear regression predictions and risk states for all containers or targeted container IDs (?id=), with optional ?filter=at_risk query support.
GET /api/anomaly/config: Returns active anomaly detection thresholds, sampling interval, and alert window configurations (requires RoleViewer).
POST /api/anomaly/config: Atomically updates anomaly thresholds and alert settings, guarded by RoleAdmin RBAC authorization and rate limiting.
GET /api/anomaly/events: Returns bounded incident history of recent early-warning OOM triggers.
Real-time header badge indicator (🔮 OOM Radar: Normal / Warning / Critical) with click-to-open configuration modal.
Real-time OOM Forecast column in container overview table with glowing countdown badges (🚨 OOM in 45s!, 🟠 ~3m 20s, 🟡 +X MB/s, 🟢 Stable).
Predictive Anomaly Radar & OOM Forecast Card with summary KPI grid and container trend forecasts table.
Predictive OOM Alarms Configuration Modal (#anomaly-modal) with threshold adjustment controls, webhook alert toggles, and incident history audit trail.
Comprehensive Unit & Integration Test Suites:
Full test coverage in internal/anomaly/regression_test.go, internal/anomaly/series_test.go, internal/anomaly/alarm_test.go, internal/anomaly/detector_test.go, internal/docker/stats_test.go, and internal/api/anomaly_test.go.