Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-9454

cloudstack-agent logs rotation outdated

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.7.0
    • None
    • cloudstack-agent
    • Security Level: Public (Anyone can view this level - this is the default.)
    • None

    Description

      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:

         <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>
      

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            pdion Pierre-Luc Dion

            Dates

              Created:
              Updated:

              Slack

                Issue deployment