Retention policy
TSDB
-retentionPeriod=30d by default. Changed on the TSDB, not in the Unimoni cabinet (via docker-compose / a systemd unit).
Postgres
- audit_log — append-only, we recommend archiving to S3 after 1 year
- alert_incidents —
state='resolved'older than 90 days can be archived periodically - sessions — auto-cleanup of expired ones via cron
Cleanup cron
DELETE FROM sessions WHERE expires_at < now() - INTERVAL '7 days';
DELETE FROM passkey_sessions WHERE expires_at < now() - INTERVAL '1 day';
DELETE FROM email_verification_tokens WHERE expires_at < now() - INTERVAL '7 days';We run it nightly.