feat(retention): every growing table is pruned; the audit log has its own window; charts read the raw window from Settings (#5155)
- prune_by_age(column) registers a time-series column with the hourly cleanup; Traefik (metrics, access summaries, global stats) and UniFi (WAN, client, WLAN, DPI, events, alarms, speedtests) register theirs in setup(). - Alert events join monitor results and Ansible runs on data.retention_days, read from Settings each run; Ansible run log files older than it are deleted. - audit.retention_days (365) keeps the audit log longer, set on Settings > General. - metric_series.points reads metrics.retention.raw_days, so the chart's raw/rollup seam is where the rollup put it (RAW_DAYS removed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,7 @@ async def save_general():
|
||||
form = await request.form
|
||||
whole: dict[str, int] = {}
|
||||
for key in ("session.lifetime_hours", "general.trusted_proxy_hops",
|
||||
"login.max_failures", "login.lockout_minutes"):
|
||||
"login.max_failures", "login.lockout_minutes", "audit.retention_days"):
|
||||
try:
|
||||
whole[key] = int(form.get(key, DEFAULTS[key]))
|
||||
except (TypeError, ValueError):
|
||||
|
||||
Reference in New Issue
Block a user