Ajcody-Logger-Issues: Difference between revisions

Line 17: Line 17:


Please see [[Logger(GnR)]] , as logger has changed dramatically in 6.x+ as compared to 5.x.
Please see [[Logger(GnR)]] , as logger has changed dramatically in 6.x+ as compared to 5.x.
====Are You Using rsyslog or syslog - Missing Stats====
See this forum thread: [http://www.zimbra.com/forums/installation/34359-upgrade-6-0-2-stats-status-no-longer-working-6.html  upgrade to 6.0.2 stats and status no longer working]


====sqlite3 and Logger====
====sqlite3 and Logger====

Revision as of 08:41, 17 February 2010

Attention.png - This article is NOT official Zimbra documentation. It is a user contribution and may include unsupported customizations, references, suggestions, or information.

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.

Are You Using rsyslog or syslog - Missing Stats

See this forum thread: upgrade to 6.0.2 stats and status no longer working

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+

Steps To Resolve
  1. Edit /opt/zimbra/conf/my.logger.cnf, and modify this line for 20 connections.
    • max_connections = 20
  2. Review the following bug and download the zmlogswatchctl script listed in the attachments section.
  3. 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
  4. 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
  • 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:

Large Logger Database Killing Performance Of ZCS

Review the following to see what might be best option for you:

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
Jump to: navigation, search