Log file rotation in KSS NG
When you add an action to log messages to a file in Kiwi Syslog Server NG (KSS NG) you can choose to automatically rotate log files. Use log file rotation to prevent log files from growing indefinitely and using large amounts of disk space.
When log files are rotated:
- Messages are logged to the current log file. For example,
SyslogCatchAll.txt
. - When the current log file reaches the specified age or size, KSS NG renames the file using its timestamp. For example,
SyslogCatchAll.txt
becomesSyslogCatchAll-2024-05-01_20240501122448654.txt
. The logging process then creates a new, empty file with the original file name. - When the new file reaches the specified age, the process is repeated. For example,
SyslogCatchAll.txt
becomesSyslogCatchAll-2024-05-02_20240502113348654.txt
, withSyslogCatchAll-2024-05-01_20240501122448654.txt
behind the newest file. - When the maximum number of log files in the rotation have been created, the log files containing the oldest timestamps are deleted.
To automatically rotate your log files:
- From the KSS NG navigation bar, choose Setup > Rules.
- Select the rule that will rotate log files and click Edit.
- In the Actions list, select the Log to file action and click Edit.
- Check the Enable Log File Rotation box.
- Specify the total number of log files in the rotation set.
- Specify the rotation criteria:
- To rotate files based on size, select Maximum log file size.
- To rotate files based on age, select Maximum log file age.
- If you are adding an action to an existing rule, click Apply. If you are creating an action in the New Rule wizard, click Add.