Daily reports · UGREEN DXP4800 NAS · by Siddharth Bhadauria
A home server that watches itself for trouble
My NAS records its own CPU, memory and disk every 15 minutes. This project turns that history into 18 features in DuckDB, retrains two anomaly detectors every six hours, keeps the better one, and opens a GitHub issue when the live readings look wrong. Each day it publishes a short model report; the charts below are built from those reports.
From the latest report
01
Training history
One point per daily report. Each chart has its own scale.
Rows of telemetry the model trained on
Grows by about 96 a day: one reading every 15 minutes.
Share of rows flagged as anomalous
What the winning model calls unusual in its own training data.
02
Pipeline
Five steps, all running in Docker on the NAS. Nothing leaves the house except the daily report and any alert.
-
Collectauto-datapulse · every 15 min
A sister project samples host and container metrics and appends them to
telemetry.duckdb. -
Build featuresDuckDB SQL window functions
Rolling means and standard deviations over one and six hours, rates of change, and time of day.
cpu_percent · ram_percent · disk_percent · cpu/ram/disk_rolling_mean_1h · cpu/ram/disk_rolling_std_1h · cpu/ram_rolling_mean_6h · cpu/ram_rolling_std_6h · cpu/ram/disk_rate_of_change · hour_of_day · day_of_week
-
Train and pickscikit-learn · MLflow · every 6 h
Isolation Forest and Local Outlier Factor are both trained with 1% contamination. Each run is logged to MLflow and the better model is saved for serving.
-
Score live readingsFastAPI
/predict· PrometheusEvery 15 minutes the monitor sends the newest reading to the API. Latency and predictions are exported to Prometheus and drawn in Grafana.
-
AlertGitHub Issues API
Two anomalous readings in a row open an issue labelled
automated-alert. Later hits comment on the open issue instead of opening new ones, with a four-hour cooldown.
03
Stack
One docker-compose.yml, managed in Portainer.
| Service | What it does | Port |
|---|---|---|
| Pipeline daemon | Retrains every 6 hours, scans for anomalies every 15 minutes | background |
| FastAPI | Serves predictions and a Prometheus metrics endpoint | :8000 |
| MLflow | Experiment runs and model artefacts | :5000 |
| Prometheus | Scrapes inference latency and anomaly counts | :9090 |
| Grafana | Latency percentiles and anomaly dashboards | :3000 |