Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create these two rotation files and add them to /etc/logrotate.d/. Be sure logrotate is run hourly (/etc/cron.hourly/logrotate), not daily.

...

caringo-content-gateway-server

Code Block
# Content Gateway Server logrotate.d file
#
/var/log/caringo/cloudgateway_server.log {
        weekly
        rotate 30
        size 512M
        compress
        missingok
        copytruncate
        dateformat -%Y-%m-%d-%s.log
}

...

caringo-content-gateway-audit

Code Block
# Content Gateway Audit logrotate.d file
#
/var/log/caringo/cloudgateway_audit.log {
        weekly
        rotate 30
        size 512M
        compress
        missingok
        copytruncate
        dateformat -%Y-%m-%d-%s.log
}

Update Existing Log Rotation

caringo-castor

Also, ensure that you have a dateformat line in /etc/logrotate.d/caringo-castor as in the above files. The default log file format when compressed will only allow you to logrotate once per day, so quickly rolling logs won’t rotate hourly as expected/ desired. You may also update the rotate line so that the CSN keeps more than 8 files- a good number might be 30 (as shown below) presuming there is enough space in /var/log. The resulting /etc/logrotate.d/caringo-castor file should look like this:

Code Block
#
# CAStor logrotate.d file
#
#
/var/log/caringo/castor.log {
        weekly
        rotate 30
        size 512M
        compress
        missingok
        copytruncate
	    dateformat -%Y-%m-%d-%s.log
} 

Enable Syslog

Perform the following modifications on each Content Gateway server’s /etc/caringo/cloudgateway/logging.yaml.

...