Configuring the Log File Retention Policy

By default, Solace PubSub+ 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 specified number of days, for example, to comply with GDPR legislation that prohibits the retention of personal data for indeterminate periods of time.

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 number of days specified by the max-num-days value. 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. In other words, this configures the broker to retain log files until they reach their maximum file sizes allowed by SolOS. This is the default value.

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.