#14.6. Maintenance and Performance Tuning
Read the following sections for Zenoss maintenance and tuning suggestions.
#14.6.1. Pack ZEO Database
The ZEO database needs to be packed periodically to reclaim space. To do this you should set up a cron job that runs the following command weekly:
$ZENHOME/bin/zeopack.py -p 8100
#14.6.2. Log Rotate Script
The logrotate
script must be present and running to rotate the Zope log (event.log
), ZEO log (zeo.log
), and access log (Z2.log
).
#14.6.2.1. Zenoss 2.4.x
At installation, Zenoss adds the following script to the /etc/logrotate.d/zenoss
file (where ZENHOME varies depending on your installation platform):
**ZENHOME**/log/event.log **ZENHOME**/log/Z2.log **ZENHOME**/log/zeo.log{ missingok weekly rotate 2 copytruncate }
In version 2.4.x, each Zenoss daemon performs its own log rotation. You can customize rotation parameters by inserting the following directives in each daemon's configuration file, located in the $ZENHOME/etc
file:
Directive | Description |
---|---|
--maxlogsize=MAXLOGKILOBYTES | Specifies the maximum size of the log file, in kilobytes. By default, the maximum is 10240 KB. |
--maxbackuplogs=MAXBACKUPLOGS | Specifies the maximum number of backup log files. By default, the maximum is 3. |
If you do not specify a directive, then Zenoss uses the default values.
#14.6.2.2. Zenoss 2.3.3 and Earlier
The logrotate
script should be present in your installation, in the /etc/logrorate.d/zenoss
file. For example, for a CentOS/RHEL, RPM-based installation, the following script should be present:
/opt/zenoss/log/*.log /opt/zenoss/log/*/*.log { missingok weekly rotate 2 copytruncate }