Set log retention policy
Log retention determines how long logs are stored before they are automatically removed. Each log type has its own retention configuration.
The configuration files are located in: C:\Program Files\Milestone\VictoriaLogs\
Log type | Configuration file |
|---|---|
System logs | VictoriaLogsConfig_System.json |
Audit logs | VictoriaLogsConfig_Audit.json |
Rule logs | VictoriaLogsConfig_Rule.json |
Change the retention period
To change the retention period:
Open the relevant configuration file.
Locate the
LogRetentionPeriodsetting.Enter the required duration. e.g.
{ "LogRetentionPeriod": "14d" }Save the file.
Supported retention formats
Unit | Example |
|---|---|
Days ( |
|
Weeks ( |
|
Months ( |
|
Years ( |
|
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.
Retention guidelines
Audit logs are often retained longer to support auditing and compliance requirements.
Log type | Typical retention |
|---|---|
System logs | Days to weeks |
Rule logs | Weeks to months |
Audit logs | Months to years |
Warning
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.