====== About ======
Zenoss employees unix's logrotate functionality, mainly so that log file do not become humongous, and also to keep them manageable. By default, logs are rotated on a weekly basis.
Logrotate is pre-setup on most Zenoss installs (post version 2.2.4), though logrotate can be used on any system.
===== Man Description =====
logrotate - rotates, compresses, and mails system logs
logrotate is designed to ease administration of systems that generate
large numbers of log files. It allows automatic rotation, compression,
removal, and mailing of log files. Each log file may be handled daily,
weekly, monthly, or when it grows too large.
Normally, logrotate is run as a daily cron job. It will not modify a
log multiple times in one day unless the criterium for that log is
based on the log’s size and logrotate is being run multiple times each
day, or unless the -f or -force option is used.
====== Zenoss Details ======
Check out the following files, locations, and commands (as su - zenoss):
* /etc/logrotate.conf
* /etc/logrotate.d/zenoss
* cd $ZENHOME/log/
$ pwd
/etc/logrotate.d
$ ls -la
total 36
drwxr-xr-x 2 root root 4096 Feb 10 14:15 .
drwxr-xr-x 47 root root 4096 Feb 10 14:21 ..
-rw-r--r-- 1 root root 62 Nov 15 2005 conary
-rw-r--r-- 1 root root 221 Dec 15 2005 mysqld
-rw-r--r-- 1 root root 745 May 10 2007 raa
-rw-r--r-- 1 root root 232 Jul 7 2004 samba
-rw-r--r-- 1 root root 154 Oct 15 2004 snmpd
-rw-r--r-- 1 root root 228 Jul 7 2004 syslog
-rw-r--r-- 1 root root 68 Jan 15 2007 zenoss
$ more zenoss
/home/zenoss/log/*.log {
weekly
rotate 2
copytruncate
}
$ cd $ZENHOME/log/
$ pwd
/home/zenoss/log
$ ls
event.log zeneventlog.log.1 zenperfsnmp.log.1 zentrap.log.1
event.log.1 zeneventlog.log.2.bz2 zenperfsnmp.log.2.bz2 zenwebtx.log
event.log.2.bz2 zenhub.log zenping.log zenwebtx.log.1
README.txt zenhub.log.1 zenping.log.1 zenwebtx.log.2.bz2
Z2.log zenhub.log.2.bz2 zenping.log.2.bz2 zenwin.log
Z2.log.1 zenjmx.log zenprocess.log zenwin.log.1
Z2.log.2.bz2 zenjmx.log.1 zenprocess.log.1 zenwinperf.log
zenactions.log zenjmx.log.2.bz2 zenprocess.log.2.bz2 zenwinperf.log.1
zenactions.log.1 zenmailtx.log zenstatus.log zenwinperf.log.2.bz2
zenactions.log.2.bz2 zenmailtx.log.1 zenstatus.log.1 zeo.log
zencommand.log zenmodeler.log zenstatus.log.2.bz2 zeo.log.1
zencommand.log.1 zenmodeler.log.1 zensyslog.log zeo.log.2.bz2
zencommand.log.2.bz2 zenmodeler.log.2.bz2 zensyslog.log.1
zeneventlog.log zenperfsnmp.log zentrap.log