[en] Set log retention policy
[en] Log retention determines how long logs are stored before they are automatically removed. Each log type has its own retention configuration.
[en] The configuration files are located in: C:\Program Files\Milestone\VictoriaLogs\
[en] Log type | [en] Configuration file |
|---|---|
[en] System logs | [en] VictoriaLogsConfig_System.json |
[en] Audit logs | [en] VictoriaLogsConfig_Audit.json |
[en] Rule logs | [en] VictoriaLogsConfig_Rule.json |
[en] Change the retention period
[en] To change the retention period:
[en] Open the relevant configuration file.
[en] Locate the
LogRetentionPeriodsetting.[en] Enter the required duration. e.g.
{ "LogRetentionPeriod": "14d" }[en] Save the file.
[en] Supported retention formats
[en] Unit | [en] Example |
|---|---|
[en] Days ( | [en] |
[en] Weeks ( | [en] |
[en] Months ( | [en] |
[en] Years ( | [en] |
[en] The minimum supported value is 1d. There is no upper limit. Logs can be retained indefinitely, with available disk space acting as the only practical limit.
[en] Retention guidelines
[en] Audit logs are often retained longer to support auditing and compliance requirements.
[en] Log type | [en] Typical retention |
|---|---|
[en] System logs | [en] Days to weeks |
[en] Rule logs | [en] Weeks to months |
[en] Audit logs | [en] Months to years |
Aviso
[en] Audit logs can contain personal data. If GDPR compliance applies to your organization, consider limiting audit log retention to one year unless a longer retention period is required by law or policy.