How does the Data Repository (Vertica) rotate logs?
search cancel

How does the Data Repository (Vertica) rotate logs?

book

Article ID: 12218

calendar_today

Updated On:

Products

CA Infrastructure Management CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

A high level overview of how Data Repository logs are rotated.

How does the Data Repository (Vertica) rotate logs?

Environment

All supported DX NetOps Performance Management releases

Resolution

The Vertica database uses the Linux logrotate command to rotate logs such as the vertica.log.  For example, when configuring log rotation for the Data Repository after installation we provide the following example command:

/opt/vertica/bin/admintools -t logrotate -d drdata -r daily -k 3

Where:

  • -d indicates the database name.
  • -r indicates how often to rotate the logs (daily, weekly, monthly).
  • -k indicates the number of weeks to keep the log.

The result of the above recommended configuration is the vertica.log will be rotated on a daily basis. Each day the current log is moved to a new gzipped file named vertica.log.YYYYMMDD.gz.

Rotated log files are kept for 3 weeks before being removed.

To verify that the vertica.log rotation has been configured correctly, look at the new gzipped vertica.log files in the Vertica catalog directory for previous days. If no gzipped files are seen starting a few days after configuring log rotation it isn't working correctly.

 

Additional Information

https://www.vertica.com/docs/10.1.x/HTML/Content/Authoring/AdministratorsGuide/Monitoring/Vertica/RotatingLogFiles.htm?zoom_highlight=rotate