Skip to content

Self-hosted monitoring for homelabs: host and container metrics and uptime checks from all your machines in one dashboard, with an optional AI agent that diagnoses incidents and suggests fixes.

docs: statistics page, retention and limits; security notes for history

karloks2005f9912b44e8b1
diff --git a/README.md b/README.md
index e722451..0c10970 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,11 @@ for what every component can touch and the limits of each protection.
(root, data disks, NFS/SMB shares, ZFS pools).
- **This machine at a glance**: live CPU, memory and disk charts for the machine
running the dashboard, with the last 30 minutes of history.
+- **Statistics for any range**: a page with charts from the last hour to everything ever
+ recorded, per server (resources, distributions, busy hours, storage with a
+ "full in about N days" estimate, reliability), per container (cards and details) and for the
+ whole fleet (incidents over time, containers by state, availability, rankings). Long
+ ranges stay cheap because history is summarised into hourly, daily, weekly and monthly rows.
- **Container details**: containers sit in a collapsible list per server, sorted by
name, with problems (unhealthy, restarting, stopped) shown even when it's closed.
Open a container to see CPU, memory used/limit, processes, network and disk I/O,
@@ -453,7 +458,21 @@ as a table.
Short ranges come from the stored check-ins, longer ones from the summaries described under
[Database schema](#database-schema), so a year of history costs about as much to load as an
-hour. CSV/JSON export of the charts is planned (Milestone 8 on GitHub).
+hour.
+
+What to know about the statistics:
+
+- **Time zones.** Charts for up to a day or two use your clock; day, week (Monday to Sunday) and
+ month points are aligned to UTC and labelled in UTC, because that is how they are summarised.
+- **Some figures are approximate**: distributions and the days-until-full estimate are worked out
+ in the browser from the points you are looking at, availability assumes each server's current
+ check interval, and the top containers show values from the latest check-in, not an average
+ over the range. The page says so where it matters.
+- **Pointer-only details.** Hover and touch tooltips don't work from the keyboard yet; every chart
+ has **View as table** as an alternative.
+- **Not built yet** (tracked in Milestone 8 on GitHub): CSV and JSON export, reboots per month, a
+ state timeline and restarts per day for containers, rankings over the chosen range, network
+ traffic charts, event markers on charts, and retention settings for the summaries.
## Alerts and incidents
@@ -584,7 +603,9 @@ standard-library Python.
intervals, manage the enrollment key and open the **Admin** page.
- **Admin** page settings that are connected today: alert thresholds (including
per-mount disk thresholds), how long metrics are kept (default 30 days; older
- host, container, disk and system-event samples are deleted hourly), and turning
+ check-in samples and system events are deleted hourly, but only after the check-ins have
+ been summarised; the summaries behind the Statistics page are not deleted yet, and a
+ retention setting for each level is planned), and turning
chat with the assistant on or off. The other sections on the page show
placeholder data and aren't saved yet.
diff --git a/SECURITY.md b/SECURITY.md
index 50ceade..41c6d0e 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -228,6 +228,20 @@ The collector's network checks are passive or opt-in, and add no privileges:
- **Visibility.** Like all monitoring data, the list of listening ports and firewall state is visible to
every signed-in account. Keep registration closed on a public dashboard.
+## Statistics and history
+
+- **Who can see it.** Every signed-in account sees the same statistics as the dashboard, for every
+ server and container. As with the rest of the monitoring data, keep registration closed on a public
+ dashboard.
+- **Nothing new is collected.** The history is summarised from check-ins already stored (averages and
+ maximums per hour, day, week and month); deleting a server deletes its summaries too.
+- **Bounded requests.** The history and statistics endpoints take only a fixed list of ranges and a
+ whitelist of metric names, cap the number of points and rows they read, and cache fleet answers for a
+ minute under keys made only from validated values, so a request cannot make them do unbounded work or
+ fill the cache. Text from the server (container names, mount paths) is shown as text, never as HTML.
+- **Limits.** The summaries are not purged yet, so history grows slowly (about 2.5 MB per server with
+ 8 containers at the planned retention); a retention setting for each level is planned.
+
## Other exposure to be aware of
- The collector mounts the host filesystem read-only at `/hostfs` to read disk usage and a few