How to configure log retention/ rotation on Private Cloud?

gagan
New Member
 
Solved Solved
0 5 1,887
1 ACCEPTED SOLUTION

gagan
New Member

This can be configured in two types of config files depending on the component for which you want to change this.

  1. For the Apigee specific components, the configuration can be done in logback.xml at <install_root>/apigee4/conf/apigee/<component>
  2. For other components such as zookeeper and Cassandra this can be done in the log4j.properties file at <install_root>/apigee4/conf/<component>

Private Cloud Operations Guide has instructions for making changes to the default values for various components under the heading Log File Maintenance

View solution in original post

5 REPLIES 5

gagan
New Member

This can be configured in two types of config files depending on the component for which you want to change this.

  1. For the Apigee specific components, the configuration can be done in logback.xml at <install_root>/apigee4/conf/apigee/<component>
  2. For other components such as zookeeper and Cassandra this can be done in the log4j.properties file at <install_root>/apigee4/conf/<component>

Private Cloud Operations Guide has instructions for making changes to the default values for various components under the heading Log File Maintenance

Along with logback.xml, do we need to configure any other file?

You could always configure logrotate. An example of logrotate configuration that doesn't require a service restart is given below:

Rolls every day unless the log is empty, keeps 30 logs compresses (but waits in case a process is still writing to the log) and uses copytruncate to prevent needing a service restart...

/opt/apigee/var/log/apigee-zookeeper/zookeeper.log {
        daily
        missingok
        rotate 30
        compress
        delaycompress
        notifempty
        nocreate
        copytruncate
}

Not applicable

I have created logrotate.conf at /opt/apigee/apigee-zookeeper/source/conf/, still nothing gets performed.

/opt/apigee/var/log/apigee-zookeeper/*.log {

daily

rotate 30

missingok

dateext

copytruncate

compress

olddir /opt/apigee/var/log/apigee-zookeeper/OLD/ }

Please someone help me if above setup is wrong (or) did I miss any other prerequisites to get effect of above log rotation settings.

@SURESHT

I have provided information on how to rotate logs on ZooKeeper and other components here.