Configuring the Log File Retention Policy

By default, PubSub+ software event brokers capture and rotate SolOS syslog files based on the size of the log files themselves. This can result in the broker retaining logs for a considerable amount of time, especially when there is minimal log churn. Such stale logs can represent a security concern when they contain personal data. You can instead configure the broker to retain logs for a maximum number of days, after which the log data will be deleted. This could be used to comply with GDPR legislation that prohibits the retention of personal data for indeterminate periods of time. The actual period that logs are retained for is subject to availability of disk space.

Because SolOS syslog files are used to troubleshoot system issues, shortening the retention period may make it more difficult to determine the cause of issues after the fact.

To configure the log file retention policy, enter the following CLI commands:

solace(configure)# logging
solace(configure/logging)# retention {days <max-num-days> | max-size}

Where:

days <max-num-days> sets the log retention policy to day based. In other words, this configures the broker to retain log files for a maximum number of days specified by the max-num-days value (the actual period that logs are retained for is subject to availability of disk space). The valid range of values is 2 to 90. Note that when there is heavy log output, multiple log files may be necessary to contain the logs for a single day. In this case, the effective number of days the logs are retained will be less than the configured max-num-days.

max-size sets the log retention policy to size based (the default broker setting). For more information, see Logging Capacity.

The no version of this command, no retention, resets the value to the default (max-size).

When you change the retention policy to day based, SolOS does not automatically delete logged messages that may be older than what the new retention policy specifies. If this is a requirement, you must manually delete the older log files. For further guidance, contact Solace.