Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-18-2009, 01:13 PM
Member
 
Posts: 13
Default Log File Sizes

Hi,

Our file system is filling up and it turns out that some of the log files (/opt/zimbra/log) are quite large. For example, the mailbox.log files can reach upwards of a gig and the convertd.log files are 300+ megs.

Zimbra rotates these files by date, but is there a way to also compress them? I'm not sure if logrotate is an option. Adding an entry for 'mailbox.log' I don't believe will compress the logs that have dates appended to the end of the file names. Using a wild card, such as 'mailbox.log*' will rotate previously rotated files.

How do you handle this?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 11-18-2009, 01:54 PM
Moderator
 
Posts: 1,147
Default

Zimbra uses logrotate to handle it's logs, as I think you have seen. So all you need to do is configure logrotate to compress the logs. The configuration for Zimbra's logs is handled in /etc/logrotate.d/zimbra. If the compression is already setup in the general configuration (it generally is) then you just need to add "compress" to each logs options.
Reply With Quote
  #3 (permalink)  
Old 11-18-2009, 02:00 PM
Member
 
Posts: 13
Default

Thanks for the response. What's odd is that logrotate runs every night at 4am; however, the Zimbra log files are rotated at midnight. Also, it doesn't seem that logrotate is invovled with appending the date to the end of the rotated file names. I take it there's another component involved?
Reply With Quote
  #4 (permalink)  
Old 11-18-2009, 02:03 PM
Moderator
 
Posts: 1,147
Default

Woops yea, forgot that there is a second logrotate config file located at /opt/zimbra/conf/zmlogrotate

I had issues as well with the settings being in two different places... took a bit to find that.
Reply With Quote
  #5 (permalink)  
Old 11-18-2009, 02:11 PM
Member
 
Posts: 13
Default

Nice, thanks. I also found that Zimbra is using log4j, which is configured in /opt/zimbra/conf/log4j.properties. By the way, do you know what script is kicking off at midnight that's incorporating /opt/zimbra/conf/zmlogrotate?

EDIT: I think /opt/zimbra/conf/zmlogrotate isn't being read; instead, it was just copied to /etc/logrotate.d directory and is being called by the regular logrotate cron job. And it's log4j that's running at midnight. Is it just me or is Zimbra convoluted?

Last edited by That Guy from that Place; 11-18-2009 at 02:17 PM..
Reply With Quote
  #6 (permalink)  
Old 11-18-2009, 02:16 PM
Moderator
 
Posts: 1,147
Default

Not a clue sorry, try looking in the daily cron tasks (/etc/cron.daily) and the zimbra user's crontab (crontab -e u zimbra).
Reply With Quote
  #7 (permalink)  
Old 11-20-2009, 03:38 PM
Moderator
 
Posts: 1,147
Default

Was poking around for something else today and found a "600.zimbra" file in /opt/zimbra/libexec. Bizarrely enough this file looks to be some sort of log rotater?!

From the name I thought it might be a remnant from 6.0.0, but I have no idea now... does this return anything for you?
Code:
grep Rotating /opt/zimbra/libexec/*
Reply With Quote
  #8 (permalink)  
Old 11-23-2009, 12:00 AM
Outstanding Member
 
Posts: 594
Default

zmlocalconfig has mailboxd_output_rotate_interval = 86400
set for 24 hrs.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.