How to troubleshoot logrotate for the Data Repository (Vertica).
search cancel

How to troubleshoot logrotate for the Data Repository (Vertica).


Article ID: 9895


Updated On:


CA Performance Management - Usage and Administration DX NetOps


Some troubleshooting steps to take when Data Repository (Vertica) logs are not rotating properly.

vertica.log is too large


Releases of Performance Management using Vertica 10.1.x


Address various possible causes and solutions for log rotation failures.


Files and logs to check and validate to ensure logrotate is set up and configured properly:

  1. Check the content/date of do_logrotate.log.
    1. /opt/vertica/log/do_logrotate.log
  2. Make sure the logrotate rpm is installed:
    1. rpm -qa logrotate
  3. Follow the chain through the following files:
    1. Make sure that the proper cronjob is created and enabled (example cronjob below).
      1. To list them for the dradmin or equivalent user, running the command as root or a different user, run:
        • crontab -u dradmin -l
      2. If logged in as the dradmin or equivalent user run:
        • crontab -l
    2. Check for the existence of the python module called within the cronjob:
      • /opt/vertica/oss/python3/bin/python3
    3. Check the /opt/vertica/config/logrotate_base.conf file. Ensure the bottom line points to the /opt/vertica/config/logrotate directory.
    4. Confirm the /opt/vertica/config/logrotate/<dbname> file exists and has correct path values.

An example of the cronjob that is created in step 3.1:

# Vertica administrator cron
# Minute    Hour     Day    Month    Day of Week            Command
       5            3          *           *               *                         /opt/vertica/oss/python3/bin/python3 -m vertica.do_logrotate &> /dev/null

If there appears to be no cron job runs for log rotate, while it works manually launched, the /var/log/cron log may hold important clues. If the dradmin users password has expired, the cron job for log rotate will fail to run with these errors in the /var/log/cron log files at the time the log rotate cron job is scheduled to run.

Jan 20 03:05:01 <hostName> crond[295031]: (dradmin) PAM ERROR (Authentication token expired)
Jan 20 03:05:01 <hostName> crond[295031]: (dradmin) FAILED to authorize user with PAM (Authentication token expired)

Additional Information