|- This article is NOT official Zimbra documentation. It is a user contribution and may include unsupported customizations, references, suggestions, or information.|
- 1 Logger Issues
- 1.1 Actual Logger Issues Homepage
- 1.2 Logger and ZCS 6.x+
- 1.3 Logger Related Bugs
- 1.4 Logger Not Working Or No Stats In Admin Console
- 1.5 Large Logger Database Killing Performance Of ZCS
- 1.6 Reinitializing Logger Database From Scratch
- 1.7 Turning Off Logger
- 1.8 Customization Or Modification Of Swatch Config
You might want to cross review these other sections as well:
Actual Logger Issues Homepage
Please see Ajcody-Logger-Issues
Logger and ZCS 6.x+
Please see Logger(GnR) , as logger has changed dramatically in 6.x+ as compared to 5.x.
sqlite3 and Logger
External Reference: Command Line Shell For SQLite
Login To DB and Quit
How to log into the logger db and to quit:
[zimbra@mail3 data]$ pwd /opt/zimbra/logger/db/data [zimbra@mail3 data]$ sqlite3 logger.sqlitedb SQLite version 3.3.6 Enter ".help" for instructions sqlite> .quit [zimbra@mail3 data]$
What Tables And To View Them
[zimbra@mail3 data]$ sqlite3 logger.sqlitedb SQLite version 3.3.6 Enter ".help" for instructions sqlite> .quit [zimbra@mail3 data]$ sqlite3 logger.sqlitedb SQLite version 3.3.6 Enter ".help" for instructions sqlite> .mode list sqlite> .tables config hosts rrd_column_type rrds sqlite> select * from hosts; 1|mail3|mail3.zimbra.REMOVED.com 2|mail3.zimbra.REMOVED.com|mail3.zimbra.REMOVED.com sqlite>.quit [zimbra@mail3 data]$
Logger Related Bugs
5.0.11 - Fixed in 5.0.12 But See Below Before Upgrading
UPDATE: From release notes: kill all zmlogger processes before upgrading to 5.0.12 from 5.0.10+
- "zmlogger fails to terminate at zmcontrol stop"
Steps To Resolve
- Edit /opt/zimbra/conf/my.logger.cnf, and modify this line for 20 connections.
- max_connections = 20
- Review the following bug and download the zmlogswatchctl script listed in the attachments section.
- Shutdown logger.
- find any orphaned logger or swatch processes, and kill them
ps -ef | grep logg
ps -ef | grep watch
- Replace the logswatch control file
mv /opt/zimbra/bin/zmlogswatchctl /opt/zimbra/bin/original.zmlogswatchctl
- Add the new zmlogswatchctl file from the above bug to /opt/zimbra/bin
- as root
chown root:root /opt/zimbra/bin/zmlogswatchctl
- as root
chmod 755 /opt/zimbra/bin/zmlogswatchctl
- as root
- Start up the logger process.
You can be checking the output in the following as well to see if any errors are still being reported:
Logger Table Check And Repair
Other items to check:
Also, check the logger tables to see if any of the tables need to be repaired
logmysql -e "check table zimbra_logger.amavis" logmysql -e "check table zimbra_logger.amavis_aggregate" logmysql -e "check table zimbra_logger.config" logmysql -e "check table zimbra_logger.disk_aggregate" logmysql -e "check table zimbra_logger.disk_status" logmysql -e "check table zimbra_logger.mta" logmysql -e "check table zimbra_logger.mta_aggregate" logmysql -e "check table zimbra_logger.processing_history" logmysql -e "check table zimbra_logger.raw_logs" logmysql -e "check table zimbra_logger.service_status"
If any of the tables need to be repaired, you replace 'check' with 'repair'. Example:
logmysql -e "repair table zimbra_logger.amavis"
/tmp/logprocess.out Shows MySQL Can't Connect
Please follow these instructions:
Logger Not Working Or No Stats In Admin Console
Check the following log files first to gather some information:
- Make sure the /etc/hosts details make the actual hostname and the zmhostname output
- If someone recently changed the hostname variables for this box, logger can be effected if done improperly and will not log the obvious issue.
- /var/log/zimbra.log (logswatch monitors this file)
- grep'ing for things such as:
egrep 'postfix|amavis|STATUS|DISK|QUEUE' /var/log/zimbra.log
- grep'ing for things such as:
- You might also want to look at the following directory:
- You should see data in here, gif and rrd files.
Then proceed with the following wiki pages, as ordered:
- If you find that tables are in need of repair, also consult the following wiki:
- If all else fails, you can clear the old logger database and reinitalize it. Please see:
Large Logger Database Killing Performance Of ZCS
Review the following to see what might be best option for you:
- Adjusting the [ zimbraLogRawLifetime: 31d ] & [ zimbraLogSummaryLifetime: 730d ] variables.
Reinitializing Logger Database From Scratch
This will effectively blow away your old logger database, allowing you to start over.
zmloggerctl stop cd /opt/zimbra/logger/db
Remove the old database:
mv db db-old
or data , if db doesn't exist
mv data data-old
You can remove (rm -rf db or data) the directory if your not worried about old directory being perserved
Reinitialize a new logger database:
Logger is probably running after this, but to make sure
You'll need to manually start this one though
You'll have to allow some time to pass for there to be enough data for the graphs to be built in the web interface.
Turning Off Logger
To not have logger startup [ use `hostname` or type in hostname] :
zmprov ms `hostname` -zimbraServiceEnabled logger
To manually shutdown logger
Customization Or Modification Of Swatch Config
The swatch config file is :
If you make a customization, you'll need to do the following for it to take effect:
zmsnmpinit zmlogswatchctl stop zmlogswatchctl start zmswatchctl stop zmswatchctl start