Ajcody-Logger-Issues
![]() |
Logger Issues
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.
Missing Stats
Are You Using rsyslog, syslog-ng, or syslog
See this forum thread: upgrade to 6.0.2 stats and status no longer working
See the bugs listed below as well.
Confirm All hosts Are Still Present
Follow the instructions at Ajcody-Logger-Issues#What_Tables_And_To_View_Them and confirm all the hosts displayed are still present in your environment. You'll probably also see an error about this in the output from the instructions given at Logger(GnR)#Statistics_show_no_data_available
Logger Not Running
You might want to check /opt/zimbra/log/zmlogswatch.out and see if it mentions a missing file or directory. For example:
tail -f log/zmlogswatch.out Error opening /var/log/zimbra-stats.log: No such file or directory at /opt/zimbra/data/tmp/.swatch_script.21119 line 92
Here's the ownership as that file should be:
ls -la /var/log/zimbra-stats.log -rw-r--r-- 1 zimbra zimbra 2500220 Feb 17 05:37 /var/log/zimbra-stats.log
Logger 6.x Bugs To Review
Some bugs to review:
- "Server statistics fail after logrotate with rsyslogd"
- "Services status: all servers reported as not running/error in web console"
- ""no data available" message after upgrading from 5.0.18 to 6.0.2"
- "48 hour server specific no stats - loading data for chart..."
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
$ pwd /opt/zimbra/logger/db/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 $
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"
- Which generally is causing a whole host of problems. Shows up in 5.0.11 release
- http://bugzilla.zimbra.com/show_bug.cgi?id=33730 dup of below
- Please get the script (attachment) within this bug that updates the control script.
- http://bugzilla.zimbra.com/show_bug.cgi?id=33604
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.
zmloggerctl stop
- 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.
zmloggerctl start
You can be checking the output in the following as well to see if any errors are still being reported:
- /tmp/logprocess.out
- /tmp/gengraphs.out
- /opt/zimbra/logger/db/data/<hostname>.err
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.
- /tmp/logprocess.out
- /tmp/gengraphs.out
- /opt/zimbra/logger/db/data/<hostname>.err
- /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:
- /opt/zimbra/logger/db/work/
- You should see data in here, gif and rrd files.
Then proceed with the following wiki pages, as ordered:
- Logger
- 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:
- King0770-Notes#Logger_Issues_-_Improve_Disk_Utilization_for_the_logger_service
- Adjusting the [ zimbraLogRawLifetime: 31d ] & [ zimbraLogSummaryLifetime: 730d ] variables.
- Ajcody-Logger-Issues#Reinitializing_Logger_Database_From_Scratch
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:
/opt/zimbra/libexec/zmloggerinit
Logger is probably running after this, but to make sure
zmloggerctl start
You'll need to manually start this one though
zmlogswatchctl start
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
zmloggerctl stop
Customization Or Modification Of Swatch Config
The swatch config file is :
/opt/zimbra/conf/swatchrc.in
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