1. Make sure that logrotate is installed
yum list logrotate
2. Make sure that log rotation is setup, as a cron job for dradmin
su dradmin
crontab -l
The following entry should appear, as a schedule job
# Minute Hour Day Month Day of Week Command
5 3 * * * /opt/vertica/oss/python/bin/python -m vertica.do_logrotate &> /dev/null
3. Edit the /opt/vertica/config/logrotate/admintools.logrotate file
Default settings shown here
{
monthly
rotate 12
# no complaining if agentt did not start yet
missingok
# compress log after rotation
compress
# rotate by copying it aside and truncating
copytruncate
}
4. Edit this file, to change the log rotation period and number of retained logs
The options for rotation are Daily, Weekly and Monthly. The default is "monthly"
Change the number for "rotate", to decrease the number of old log files to save. The default is "12"