Logger (ZCS 5.0.x and earlier): Difference between revisions

mNo edit summary
mNo edit summary
Line 1: Line 1:
Although the logger is not essential for Zimbra to operate, this article will describe how to troubleshoot Logger configuration, setup, and troubleshooting.
Although the logger is not essential for Zimbra to operate, this article will describe setup, configuration, and troubleshooting of the logger service.


=Accessing the logger MySQL database manually=
=Setup=
=Configuration=
 
=Troubleshooting=
==Accessing the logger MySQL database manually==


  $ logmysql zimbra_logger
  $ logmysql zimbra_logger
Line 21: Line 25:
  +-------------------------+
  +-------------------------+


=Overview of logger pipeline=
==Overview of logger pipeline==


1. The mta components (postfix, amavis) and system status scripts (zmstatuslog, zmdisklog, zmqueuelog) log to /var/log/zimbra.log.
1. The mta components (postfix, amavis) and system status scripts (zmstatuslog, zmdisklog, zmqueuelog) log to /var/log/zimbra.log.
Line 31: Line 35:
4. The zmlogprocess script breaks down the lines from the raw_logs table and inserts the data into the mta, mta_aggregate, amavis, amavis_aggregate, disk_status, disk_aggregate, and processing_history tables of the zimbra_logger db.
4. The zmlogprocess script breaks down the lines from the raw_logs table and inserts the data into the mta, mta_aggregate, amavis, amavis_aggregate, disk_status, disk_aggregate, and processing_history tables of the zimbra_logger db.


=What queries the logger database=
==What queries the logger database==


1. The '''[[Monitoring_Zimbra_Servers#Generating_Daily_Mail_Reports|zmdailyreport]]''' script processes data from the mta and amavis tables, and emails the results to root, which is normally an alias to the original zimbra admin account.
1. The '''[[Monitoring_Zimbra_Servers#Generating_Daily_Mail_Reports|zmdailyreport]]''' script processes data from the mta and amavis tables, and emails the results to root, which is normally an alias to the original zimbra admin account.

Revision as of 01:34, 23 February 2007

Although the logger is not essential for Zimbra to operate, this article will describe setup, configuration, and troubleshooting of the logger service.

Setup

Configuration

Troubleshooting

Accessing the logger MySQL database manually

$ logmysql zimbra_logger
mysql> show tables;
+-------------------------+
| Tables_in_zimbra_logger |
+-------------------------+
| amavis                  |
| amavis_aggregate        |
| config                  |
| disk_aggregate          |
| disk_status             |
| mta                     |
| mta_aggregate           |
| processing_history      |
| raw_logs                |
| service_status          |
+-------------------------+

Overview of logger pipeline

1. The mta components (postfix, amavis) and system status scripts (zmstatuslog, zmdisklog, zmqueuelog) log to /var/log/zimbra.log.

2. The logswatch script monitors /var/log/zimbra.log and sends new lines to the zmlogger script.

3. The zmlogger script inserts the log lines into the raw_logs table, and updates the service_status table, in the zimbra_logger database.

4. The zmlogprocess script breaks down the lines from the raw_logs table and inserts the data into the mta, mta_aggregate, amavis, amavis_aggregate, disk_status, disk_aggregate, and processing_history tables of the zimbra_logger db.

What queries the logger database

1. The zmdailyreport script processes data from the mta and amavis tables, and emails the results to root, which is normally an alias to the original zimbra admin account.

[zimbra@mail ~]$ crontab -l | grep zmdailyreport
10 1 * * * /opt/zimbra/libexec/zmdailyreport | /opt/zimbra/postfix/sbin/sendmail root
[zimbra@mail ~]$ zmprov getAccount admin | grep Alias
zimbraMailAlias: root@mail.domain.com
zimbraMailAlias: postmaster@mail.domain.com

2. The zmmsgtrace tool queries the mta and amavis tables and outputs basic info about matching messages.

3. The zmgengraphs script queries the disk_aggregate, mta_aggregate, and amavis_aggregate tables and creates images that will be displayed in the admin console.

4. Loading the admin console queries the service_status table, and viewing server statistics will display the graphs created by zmgengraphs.

[screenshot]
Jump to: navigation, search