diff --git a/src/lib/retention/retention-config.ts b/src/lib/retention/retention-config.ts index e7472d1..6ad6739 100644 --- a/src/lib/retention/retention-config.ts +++ b/src/lib/retention/retention-config.ts @@ -50,6 +50,31 @@ export const retentionPolicies: RetentionPolicy[] = [ batchSize: 50, description: 'Consent-Logs nach Ablaufdatum löschen (DSGVO: 3 Jahre)', }, + // Monitoring Collections + { + name: 'monitoring-snapshots', + collection: 'monitoring-snapshots', + retentionDays: parseInt(process.env.RETENTION_MONITORING_SNAPSHOTS_DAYS || '7', 10), + dateField: 'createdAt', + batchSize: 500, + description: 'Monitoring-Snapshots älter als X Tage löschen', + }, + { + name: 'monitoring-alert-history', + collection: 'monitoring-alert-history', + retentionDays: parseInt(process.env.RETENTION_MONITORING_ALERTS_DAYS || '90', 10), + dateField: 'createdAt', + batchSize: 100, + description: 'Alert-History älter als X Tage löschen', + }, + { + name: 'monitoring-logs', + collection: 'monitoring-logs', + retentionDays: parseInt(process.env.RETENTION_MONITORING_LOGS_DAYS || '30', 10), + dateField: 'createdAt', + batchSize: 200, + description: 'Monitoring-Logs älter als X Tage löschen', + }, ] /**