AdminTools log filling up file system

Document ID : KB000116688
Last Modified Date : 01/10/2018
Show Technical Document Details
Introduction:
You may need to change log rotation settings, for the /opt/vertica/log/adminTools.log, if it is filling up the disk
Question:
How do you set log rotation for the adminTools.log file?
Environment:
CA Performance Management  All Versions
Answer:
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"
 
Additional Information:
c