The following are the instructions for configuring the TrapExploder LogRotate functionality.
LogRotate is used to create a new log file every day, archive (compress) the previous day’s file and retain a specific number of archives (365 in this example).
This function provides an easy maintenance mechanism that also makes searching the current day or previous day’s logs easier. Without this function, a single huge file would be continuously appended to until all disk space was consumed.
TrapExploder running on Linux
Create the Configuration file
Create a new configuration file for LogRotate in /ca/trapx/custom/conf/trapx-log-rotate.conf with the following contents:
service trapexploder restart
To automate LogRotate to run every day at midnight edit the crontab as root by entering the following command:
Then add the following line below and save:
0 * * * /usr/sbin/logrotate /ca/trapx/custom/conf/trapx-log-rotate.conf