mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 15:04:14 +00:00
feat(monitoring): add retention policies for monitoring collections
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0ff8b5c9d8
commit
d252ed321a
1 changed files with 25 additions and 0 deletions
|
|
@ -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',
|
||||
},
|
||||
]
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue