Entering content frame

Procedure documentation add Locate the document in the library structure

Use

You add a new entry to an event dispatcher configuration file. An entry in a configuration file assigns conditions (event categories and other event properties) to a command of the Database Manager CLI or another program. If the event dispatcher that uses the configuration file has already been started, it takes into account the new entry immediately.

Prerequisites

If required, you need to have activated the event with the Database Manager CLI.

Note

You can find an overview of the events you can activate and deactivate in Concepts of the Datsbase System, Overview of Database Events.

The special events of the event dispatcher are always active.

Procedure

dbmevtdisp add <configuration_file> <condition> <command>

 

<configuration_file>

Configuration file with complete path

If this file does not yet exist, the event dispatcher then creates this in the current folder when the add command is executed.

<condition>

Condition that must be fulfilled in order for the event dispatcher to execute the <command>.

Syntax:

Name == <event_category> [Priority == HIGH|MEDIUM|LOW] [Value1 ==|>=|<=|>|< <NumVal>] [Value2 ==|>=|<=|>|< <NumVal>]

<NumVal>

Values that the event dispatcher compares with the values VALUE1 and VALUE2 that the database system returns whenever an event occurs (additional information on the database status according to event category).

<command>

Command executed when <condition> is fulfilled

Syntax:

Command == <program> [<parameters>]

<event_category>

Event category

You can use the * character as a placeholder.

<program>

Program (and command of this program if required) called whenever the event occurs

<parameters>

Parameters that the event dispatcher transfers to the <program> whenever the event occurs

You can use any parameters you like. You can find a list of special predefined parameters in the following table.

The following table lists the predefined parameters you can use in the configuration file of an event dispatcher.

Predefined Parameters

<parameter>

Description

$DBNAME$

Name of the database instance monitored

$DBMUSERPW$

Name and password of DBM operator by means of which the event dispatcher logs on to the database instance.

$EVTNAME$

Event category

$EVTVAL1$

Initial value VALUE1 returned by the database system whenever the event occurs (additional information on database status, depending on the event category)

$EVTVAL2$

Second value VALUE2 returned by the database system whenever the event occurs (additional information on database status, depending on the event category)

$EVTDATE$

Date on which event was triggered

$EVTTIME$

Time at which event was triggered

$EVTTEXT$

Description of event

$EVTCOUNT$

Number of times event has already been triggered

$EVTPRIO$

Priority of event

$SERVERNAME$

Database computer

Result

OK
<entry_ID>

<entry_ID> is a numerical ID that identifies the newly-created entry in the configuration file.

Note

You need this ID if you want to delete the entry again from the configuration file.

Example

You create a new entry in the configuration file C:\test\testconfig.cfg. If an event dispatcher is started with this configuration file, this entry has the effect that, if the event dispatcher receives a LOGFULL event, it calls the alarmapp program and transfers the name of the database instance that has triggered the event to this program.

dbmevtdisp add C:\test\testconfig.cfg Name == LOGFULL Command == "alarmapp $DBNAME$"

OK
2

The event dispatcher has allocated the ID 2 to the newly-created entry in the configuration file.

See also:

Overview of Event Dispatcher Commands

 

 

Leaving content frame