You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Pierre-Luc Dion (JIRA)" <ji...@apache.org> on 2016/08/11 12:33:22 UTC

[jira] [Created] (CLOUDSTACK-9454) cloudstack-agent logs rotation outdated

Pierre-Luc Dion created CLOUDSTACK-9454:
-------------------------------------------

             Summary: cloudstack-agent logs rotation outdated
                 Key: CLOUDSTACK-9454
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9454
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: cloudstack-agent
    Affects Versions: 4.7.0
            Reporter: Pierre-Luc Dion
            Priority: Minor


Log4j configuration for cloudstack-agent does not include an archival policy so it can fill /var partition over time.

we should include a rotation limit of example 31 files which mean 31 days.

example:
{code}
   <appender name="FILE" class="org.apache.log4j.rolling.RollingFileAppender">
      <param name="Append" value="true"/>
      <param name="Threshold" value="INFO"/>
      <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
        <param name="FileNamePattern" value="/var/log/cloudstack/agent/agent.log.%d{yyyy-MM-dd}.gz"/>
        <param name="ActiveFileName" value="/var/log/cloudstack/agent/agent.log"/>
        <param name="MaxBackupIndex" value="31"/>
      </rollingPolicy>
      <layout class="org.apache.log4j.EnhancedPatternLayout">
         <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{3}] (%t:%x) (logid:%X{logcontextid}) %m%n"/>
      </layout>
   </appender>
{code}


The logrotate file {{/etc/logrotate.d/cloudstack-agent}} deployed with cloudstack-agent is outdated.

The log file: {{/var/log/cloudstack/management/security_group.log}} does not have logrotation policy.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)