Skip navigation
Currently Being Moderated

Zenoss Logfiles are too big

VERSION 2  Click to view document history
Created on: Sep 14, 2009 12:05 PM by Noel Brockett - Last Modified:  Sep 24, 2009 2:58 PM by Noel Brockett

Especially when you use zenjmx your log files can be to big. Here is how you could solve this.



Zenoss keeps log files for each daemon in $ZENHOME/log/


When you are using a lot of datapoints for JMX or SNMP your log files can grow a lot.
Log files are by default handled by logrotate.


Although the default is to logrotate each week, my logs are growing to almost 5 GB/week

This is in my opinion not needed.


A solution could be to logrotate the files based on the file size instead of the file age.


open this file as root: /etc/logrotate.d/zenoss


now change the file so it looks like this:


/opt/zenoss/log/*.log {
    rotate 5


What have I done now?


I have added size in the configuration, so each time the logrotate daemon runs it will rotate the log if it is bigger then 50MB and does this for 5 cycles.


So each log can be a maximum of 5 * 50 =   250MB big


In my case this is enough.


One of my arguments is that I have a nightly backup of the whole machine, so if I need an OLD log file I will need to restore it back from my backupmedia.


And on other agrument is that I'm using a DRBD disk which is only 10GB big.


This means it can quickly be full.

Comments (0)