IBM Operations Analytics - Log Analysis, Version 1.3.2

DB2 Insight Pack

A DB2® Insight Pack is provided with IBM® Operations Analytics - Log Analysis.

The Insight Pack includes support for ingesting and performing metadata searches against the DB2 version 9.7 and 10.1 db2diag.log files.

This document describes the version of the DB2 Insight Pack that is installed when you install IBM Operations Analytics - Log Analysis. An updated version of the DB2 Insight Pack may have been published after this version of IBM Operations Analytics - Log Analysis. To download the latest versions of this Insight Pack and updated documentation, see http://www.ibm.com/developerworks/servicemanagement/downloads.html.

Best practices for db2diag files

DB2 creates multiple db2diag.log files based on the database configuration. Follow these best practices to handle multiple db2diag logs for the rotating and multiple database partition scenarios.

Scenario 1: Database spread across partitions and members
If the database is spread across multiple partitions and members, then a db2diag file is created in multiple directories according to the DIAGPATH value. It can be difficult to interpret the DIAGPATH and db2nodes.cfg to find all the log files for each member and host. The best practice recommendation is to use the db2diag tool, which consolidates all the log records in to a single file.
For databases spread among multiple partitions and members, consolidate the records from all db2diag log files on all your database partitions, run the following command:
	db2diag -global -output filename.log
Where filename.log is the name of the consolidated log file, such as db2diag_myglobalrecords.log.
Scenario 2: Rotating log files
If DB2 is configured for rotating log files, the files are named dynamically as db2diag.<number>.log. The best practice is to change the default log agent configuration files to recognize the rotating logs.

If you choose to consolidate the rotating logs with the db2diag tool, follow the DB2 data loading best practice about loading the consolidated file.

Using the Data Collector client to load the consolidated rotating logs can improve data ingestion performance. However, you must filter the logs based on timestamps to avoid ingesting duplicate logs each time you consolidate the logs.

Optional: Filtering db2diag log file records can reduce the time required to locate the records needed when troubleshooting problems. If the db2diag tool is used to filter records, only those records included in the filter result will be annotated by the IBM Operations Analytics tools - all other records are excluded. The db2diag tool includes other options for filtering and formatting the log records.

If you choose to consolidate the rotating logs with the db2diag tool, use the Data Collector as described in the DB2 data loading best practice about loading the consolidated file.

More information about the db2diag utility can be found at the DB2Information Center here:

For version 10.1:

http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.1.0/com.ibm.db2.luw.admin.trb.doc/doc/c0020701.html

For version 9.7:

http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.trb.doc/doc/c0020701.html

Note: To find the locations of the individual logs, use the DB2 command:
GET DATABASE MANAGER CONFIGURATION
On UNIX systems, The DIAGPATH parameter shows the diagnostic data directory path that contains the log files. The default directory is:
INSTHOME/sqllib/db2dump, 
where INSTHOME is the home directory of the DB2 instance.
On Windows systems, the default path depends on the operating system. To find the default path on Windows, use the command:
DB2SET DB2INSTPROF 

Configuration artifacts

The Insight Pack supports the DB2 timestamp format YYYY-MM-DD-hh.mm.ss Z. You can customize artifacts in the index configuration file.

Note: Data sources are not predefined. A user with administrator privileges must define at least one DB2 data source before the application can be used.
The following table lists the configuration artifacts that are provided with the Insight Pack for each log file.
Table 1. Insight Pack configuration artifacts
Artifact Name for the db2diag.log
Splitter rule set DB2Diag-Split
Annotator rule set DB2Diag-Annotate
Source type DB2Diag
Collection DB2Diag-Collection1

Log File Agent configuration

The supported log files share IBM Tivoli® Monitoring Log File Agent (LFA) configuration files. The following LFA configuration files are in the <HOME>/IBM-LFA-6.30/config/lo directory:
  • DB2InsightPack-lfadb2.conf: Configuration file for the DB2 log file agent.
  • DB2InsightPack-lfadb2.fmt: Matches records for the db2diag log files.

Splitting and annotation AQL modules

Splitting and annotation are handled by the following Annotation Query Language (AQL) modules.
Table 2. Insight Pack AQL modules
AQL Module Description
common Common code module that is used across multiple log files (for example, to recognize timestamp formats).
commonDB2 Common annotations module that is used across splitter and annotator modules.
annotatorDB2Diag Annotator module for db2diag log files.
splitterDB2Diag Splitter module for db2diag log files.


Feedback