Results 1 to 2 of 2

Thread: Mailbox/Zimbrastats Rotate

  1. #1
    etoczek is offline Starter Member
    Join Date
    Jun 2007
    Posts
    2
    Rep Power
    8

    Default Mailbox/Zimbrastats Rotate

    It looks like there is a nightly process that goes through and rotates the logs in /opt/zimbra/log, however once it's done the process does not compress the files. To try to keep file space down, and retain zimbrastats.csv for historical use I want to compress the files after they have been rotated, however I'm not sure what script is actually doing this rotation.

    It's not listed in logrotate, and I can't find any script that is doing it in zimbra's crontab. Does anybody know what's doing this rotation? Am I just not looking in the right spot?

    Thanks.

  2. #2
    bburtin is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    78
    Rep Power
    9

    Default

    Unfortunately there's not a uniform way to rotate log files. The server code uses Log4j for configuring, writing and rotating log files. To change the configuration for zimbrastats.csv, edit the following section in /opt/zimbra/conf/log4j.properties:
    Code:
    # Appender STATS writes to the file "zimbrastats.csv".
    log4j.appender.STATS=org.apache.log4j.ZimbraStatsAppender
    log4j.appender.STATS.File=/opt/zimbra/log/zimbrastats.csv
    log4j.appender.STATS.DatePattern='.'yyyy-MM-dd
    log4j.appender.STATS.Append=true
    log4j.appender.STATS.layout=org.apache.log4j.PatternLayout
    log4j.appender.STATS.layout.ConversionPattern=%m%n
    ZimbraStatsAppender is a hack of Log4j's DailyRollingFileApender class. The Log4j Javadoc has the details about configuration options.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •