Add automated data retention cleanup

Implements edge function, Django tasks, and UI hooks/panels for automatic retention of old metrics, anomalies, alerts, and incidents, plus updates to query keys and monitoring dashboard to reflect data-retention workflows.
This commit is contained in:
gpt-engineer-app[bot]
2025-11-11 02:21:27 +00:00
parent 07fdfe34f3
commit 915a9fe2df
9 changed files with 589 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
-- Fix security warnings: Set search_path for all retention policy functions
ALTER FUNCTION cleanup_old_metrics(INTEGER) SET search_path = public;
ALTER FUNCTION cleanup_old_anomalies(INTEGER) SET search_path = public;
ALTER FUNCTION cleanup_old_alerts(INTEGER) SET search_path = public;
ALTER FUNCTION cleanup_old_incidents(INTEGER) SET search_path = public;
ALTER FUNCTION run_data_retention_cleanup() SET search_path = public;