Previous Topic

Next Topic

Book Contents

Book Index

Quick Start

Log Analyzer is functional immediately after installation. Its default configuration is to use a MS Access database to store data.

As soon as you open the viewer for the first time, it automatically sets up the database defined in the console (default MS Access). Make sure that the Database connections – Default option (in the viewer) is selected (bold font).

This is perfectly adequate for smaller installation with low traffic volumes. For larger installations you should consider using an industrial-strength database solution, such as MySQL or MS SQL.

NOTE: If you want to use Log Analyzer – Viewer, you still have to setup the database within the Viewer (even for MS Access), which as explained before. It is setup automatically inheriting console DB settings on the first time you run the Viewer. If you have to define the DB again in the Viewer, double-click the Database Connection – New and setup it here.

Do the following to start collecting data and analyze it:

Required Steps

  1. In the Help – License... main menu item, verify that your license for the Log Analyzer module is not expired.

    (Tick the Display all licenses check box to reveal licenses for all modules.)

    If expired, contact your sales representative who will provide you with 30 day trial license.

  2. Under the System – Services – General – <service> – Logging tab, check the Active box and on the System – Services – General tab select the Logging type (Debug, Extended, etc.).

    NOTE: The global logging have to be enabled – use API Console – the c_system_logging_general_appendfiles variable.

  3. Under Log Analyzer – General, check Active.

    Select the logs to process.

  4. Under Log Analyzer – General, import the data.

    Logs are imported always at 1:00 AM, so at the moment you have at disposal only the previous day logs analysis. To view analysis of logs for the current day, you need to use the Import Now button and select the day you wish to import. It may take a while to complete this depending on the size of logs.

    NOTE that if you want to use other database than MS Access (default), you have to set this database prior to this step. See the Database Setting section further.

  5. Under Log Analyzer – General, click the Run viewer button and view your data.

    IceWarp Log Analyzer application opens – when run in this way, it automatically opens the database that was configured in the GUI.

  6. Click Apply to save the settings.

Optional Steps

For mid-sized and larger installations, it is recommended to use MySql or MS SQL databases instead of MS Access.

Database Setting – Windows

  1. Create a database.

    Create a blank database with your database administration tools.

  2. Under Log Analyzer – General, click DB Settings and configure the connection to the database you just created.

    database_dialog

    NOTE: This dialog is different to the standard one used elsewhere in IceWarp Server.

    Field

    Description

    Database

    Ensure you enter the correct physical or UNC path to the database file.

    NOTE that the "..." button is available only when MS Access syntax is selected.

    Server

    Enter either IP or a fully qualified domain name.

    Username

    Enter the user name used to connect the database.

    Password

    Enter the password used to connect the database.

    Syntax

    Select the database type.

    Driver

    Connector to the database.

  3. To test the connection, click the Import Now button, then OK at the Select Date dialog.
  4. Go to the logs directory and open the loganalyzer\laYYYYMMDD.log file to see the result.

    You do not have to create any DSN.

Database Setting – Linux

  1. Install ODBC driver for MySQL.

    • On RHES 4.x

    Install mysql-connector-odbc available at rpm.pbone.net

    Uncomment in /etc/odbcinst.ini the definition for the MySQL driver

    [MySQL]

    Description = ODBC for MySQL

    //Driver = /usr/lib/libmyodbc.so (Aggregation functions didn't work with 2.x version)

    Driver = /usr/lib/libmyodbc3.so (DO check the value, default is wrong)

    Setup = /usr/lib/libodbcmyS.so

    FileUsage = 1

    • On RHES 5.x

    yum install mysql-connector-odbc

    Uncomment in /etc/odbcinst.ini the definition for the MySQL driver

    [MySQL]

    Description = ODBC for MySQL

    Driver = /usr/lib/libmyodbc3.so (DO check the value, default is wrong)

    Setup = /usr/lib/libodbcmyS.so

    FileUsage = 1

  2. Create a DSN

    Create a DSN called ila, add section like one that follows to the .odbc.ini file in the user's home directory (/root/.odbc.ini)

    Example:

    [ila]

    Description= ILA

    Driver= MySQL

    Server= localhost

    Database= ila

    Port= 3306

    Socket=

    Option= 18435

    Stmt=

    User= root

  3. Configure the importer

    Under the Log Analyzer – General tab, tick the Active box.

    Click the DB Settings button.

    In the Database dialog, fill in the Database field – the DSN name (created in step # 2) where Log Analyzer will write its tables.

    Fill in the Server field – the server address (IP or FQDN) where mysql is running.

    Fill in the Username and Password fields – the credentials used to connect to MySQL.

    Set the Syntax combo MySQL.

    Example:

    Database = ila

    Server = 127.0.0.1

    User = ODBC

    Password = ODBC

    NOTE that up to version 10.1 the control cannot run the importer automatically, to schedule the import process you can use a shell script like this:

    ...

    #!/bin/bash

    # Launch the importer

    export ICEWARPDIR=/opt/icewarp

    export PATH=/usr/bin:/bin:/usr/sbin:/usr/bin:$ICEWARPDIR/loganalyzer

    export LD_LIBRARY_PATH=/opt/icewarp/lib

    export IWS_INSTALL_DIR=/opt/icewarp # Icewarp installation directory

    export IWS_PROCESS_USER=root # User running the service

    mlaimp

    ...

    Put this into /etc/cron.daily

    Launch the importer and check the logs.

Advanced Configuration

  1. To have a statistical overview of the logs e-mailed after the import completes:

    Under Log Analyzer – Statistics, click Active.

    Enter the email address where you want the overview to be sent.

    Select, which log overviews you want to be included into your report.

    Click Apply to save these settings.

    NOTE that clustered installations are supported by importing logs from multiple servers into the same database.

  2. To import logs from multiple servers such as clustered installations into the same database:

    Under Log Analyzer – General – Options, set the Server ID feature to differentiate among servers.

    Statistics from multiple servers can be collected to a common database and analyzed through a single viewer. Each copy of the importer in use requires a server license, while the amount of Viewers in use is not limited by any client license and can be used on server, on laptop, or by all domain administrators in parallel.

    To access logs from multiple servers through the same Viewer, just use the same database for all server installations. The system also supports load-balancing installations and can identify each server in the cluster by the means of the optional Server ID tag, which needs to be set differently for each of the servers.

  3. To be able to see the full service:

    Under Log Analyzer – General – Options, tick the Import raw session data option.

    This allows you to see the full service session details for each log entry, but will also result in your database size increase.

  4. To limit the size of the database:

    By default, the system deletes statistics for log entries older than 7 days to limit size of the database. The amount of days to keep in the analysis can be set through the Delete data older than (days) option.

  5. To view logs regarding the importer activity:

    The logs regarding the Importer activity are generated into the <Installation Root>/loganalyser folder with details regarding the import.

See Also

Log Analyzer

Log Importer

External Log Viewer Application

Session Log without Raw Data Import

Support & Troubleshooting