IBM DB2 Query Patroller Administration Guide

Log Monitor Configuration File

The log monitor configuration file must contain one or more configuration command lines. These commands define the log file to be monitored, the wake-up interval, the list of message recipients, and the filter criteria.

Each line in the configuration file may be empty or may contain a comment or configuration command. Comment lines start with a pound sign (#). One or more white space characters can precede the comment indicator or the first character in the configuration command. You can also enter comments at the end of each configuration command line when preceded by a pound sign.

Example Configuration File

The following represents a sample configuration file:

# DB2 Query Patroller sample log monitor configuration file
INTERVAL 15                          # wake up every 15 seconds
LOGFILE * TRUNCATE                   # truncate the log at start-up
MAILTO iwm root                      # send e-mail to these users
MAILTO admin@customer.com            # add this one too
INCLUDE SEV=E                        # include error messages
EXCLUDE ALL                          # exclude all others	

Log File

Messages written to the log file display in the following format:

<date-time> <node> <program> <pid> <message-id> <source-line> <text>

where:

The default log file name is syserr.log. DB2 Query Patroller creates this in the $DQP_RUNTIME/log directory on UNIX, or in the sqllib\db2\log directory on Windows. However, if the user sets the DQP_LOG profile variable, DB2 Query Patroller creates the log file in the directory specified.

INTERVAL Command

Syntax:

>>-INTERVAL----seconds-----------------------------------------><
 

The INTERVAL command accepts one parameter: the number of seconds that the log monitor should wait between checking the log file for new messages. If you do not specify an INTERVAL command, the parameter defaults to 30 seconds. If you specify multiple INTERVAL commands, log monitor uses the last specified command.

LOGFILE Command

Syntax:

>>-LOGFILE----+-file_name--+---+-----------+-------------------><
              '-*----------'   +-TRUNCATE--+
                               '-CONTINUE--'
 

The LOGFILE command defines the log file name and the action that should be taken when the log monitor starts. You must first specify the log file name parameter, which may be specified as an asterisk (*) if you want to use the default log file name. The default log file name is syserr.log. DB2 Query Patroller creates this in the DQP_RUNTIME/log directory on UNIX, or in the instance_directory\log directory on Windows. However, if the user sets the DQP_LOG profile variable, DB2 Query Patroller creates the log file in the directory specified.

The action to take is specified by TRUNCATE, CONTINUE, or by omitting these keywords altogether. If you specify TRUNCATE, DB2 Query Patroller removes all messages from the log file when the log monitor initializes. If you specify CONTINUE, DB2 Query Patroller sends only messages added to the log file after the log monitor starts. If you omit theses keywords, DB2 Query Patroller sends all messages already in the log file, as well as any new messages.

If you specify multiple LOGFILE commands, DB2 Query Patroller uses the last command. If you do not specify a LOGFILE command, the log monitor monitors the default log file and any messages already in the log file at startup are sent.

MAILTO Command

Syntax:

>>-MAILTO----address-------------------------------------------><
 

The MAILTO command defines the recipients of messages. Each MAILTO command must include one or more e-mail addresses. You must specify at least one MAILTO command. If you are running DB2 Query Patroller on Windows, e-mail notification is sent using the Windows Message Application Programming Interface (MAPI). The e-mail addresses specified with the MAILTO command must be in a format recognizable by the MAPI service provider. For information on setting up e-mail notification on Windows, see E-mail Notification on Windows.

INCLUDE and EXCLUDE Commands

Syntax:

>>-+-INCLUDE--+---test1--+--------------------+----------------><
   '-EXCLUDE--'          '-test2--+--------+--'
                                  '-test3--'
 

Each test is one of: SEV (message severity), NUM (message number), PGM (program name), or ALL.

The INCLUDE and EXCLUDE commands define the message filtering criteria. The log monitor tests each new message against the filter commands. Recipients receive those messages that match an INCLUDE command or do not match any filter commands. The log monitor tests each message against the filter commands in the order specified in the configuration file. The first command that matches the message on all tests specified causes the message to be included or excluded.

You cannot specify the ALL test with any other test. It should appear only on the last INCLUDE or EXCLUDE command in the configuration file because it matches all messages, causing all subsequent filter commands to be ignored.

Of the other tests (SEV, NUM, and PGM), you can specify up to three on each filter command, but you can only specify one of each type on each command. If you specify more than one test on a command, all tests must match the message for the command to apply. A comparison operator and comparison value must follow each test type name. The operator must either be the equal sign (=) or an exclamation mark followed by an equal sign (!=). The equal sign means that in order to match, the test must be equal to the value. The exclamation mark and equal sign specifies that the test must not be equal to the value. The following list explains the filter test types.


[ Top of Page | Previous Page | Next Page ]