Smarts SAM: Log files rolling automatically in Smarts log directory; Long list of rotated log files created in <BASEDIR>/local/logs directory
search cancel

Smarts SAM: Log files rolling automatically in Smarts log directory; Long list of rotated log files created in <BASEDIR>/local/logs directory

book

Article ID: 332247

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:


SAM Logs rolling without cause in linux or the SAM logs are not retaining proper names not allowing client logging tools to function properly

The SAM Logs rolling without cause in linux or the SAM logs are not retaining proper names. This often appears that the log files have a date.time appended to them rather then a custom log naming or the standard 001, 002, ...
Example:

-rw-r--r-- 1 root amer 209836584 May 17 21:41 SAM.log.038-20150517
-rw-r--r-- 1 root amer 854299992 May 18 23:10 SAM.log-20140518
-rw-r--r-- 1 root amer 465201195 May 19 10:27 SAM.log-20140519
-rw-r--r-- 1 root amer 209890427 May 19 13:24 SAM.log.039-20140519
-rw-r--r-- 1 root amer 209799072 May 19 17:58 SAM.log.040-20140519
 

 


Environment

VMware Smart Assurance - SMARTS

Cause

This is caused by having logrotate enabled in linux. This tool utilizes its own rules to rotate all logs inside the system, including Smarts logs.

Where is the default configuration file for logrotate?

/etc/logrotate.conf

Where are other configuration files are kept?

/etc/logrotate.d

What is contained in the default configuration file?

Information in the default configuration file ( /etc/logrotate.conf ) are the default values. Information in other configuration files overrides these default values.

How are configuration files for logrotate organized?

Default values are kept in /etc/logrotate.conf. Configuration files for specific services are kept in /etc/logrotate.d. Settings specified in service-specific configuration file override default value specified in /etc/logrotate.conf

Resolution

Disable logrotate for linux. This should allow the logs to be handled by smarts.

How to disable log rotation for any service?

Delete (or comment out the content) the appropriate file from /etc/logrotate.d.