Next Topic

Previous Topic

Book Contents

Example Rule Specifications File

<Traverse>

<message-handler>

<ruleset type="type_name" name="source_name">

<rule>

<description>descriptive_text</description>

<pattern>regular_expression</pattern>

<action>match_action</action>

<mapping>

<field name="field_name_1" match="match_index_1"/>

<field name="field_name_2" match="match_index_2"/>

[...]

<field name="field_name_n" match="match_index_n"/>

</mapping>

<severity>severity_name</severity>

<show-message>true</show-message>

<auto-clear>600</auto-clear>

<transform>new_message</transform>

<additional-duplicate-key>${message_text}

</additional-duplicate-key>

</rule>

<rule>

[...] <!-- multiple rules -->

</rule>

</ruleset>

</message-handler>

</Traverse>

Rule Elements

Element Name

Description

type

file | socket | trap | winevt | syslogd

name

Matches the source name. It can be * in which case its rules are checked before any other rulesets.

description

Free-form text describing the incoming message (optional).

pattern

perl5 (hence oro) compatible regular expression. The match assumes ignorecase is set (case is ignored).

action

accept | reject

mapping.field.name

device_name | device_address | a unique word

mapping.field.match

1 .. n

This corresponds to one of the match items from regular_expression.

severity

ok | warning | critical | unknown

show-message

true | false

If false, the remote DGE will not display the message on the console, but can still be used to trigger an action and generate reports.

auto-clear

Optional. Automatically removes the message from the console after the specified number of seconds.

transform

Converted message which is sent to the DGE.

additional-duplicate-key

The device name, device address, and event category are typically used to determine if an event is a duplicate of another. If additional fields should be considered when determining if an event is a duplicate, they must be specified here.

You can have a default rule that matches everything using the following:

<pattern>.*</pattern>

You can log each message that comes in before the rules are applied by enabling debug level logging for the message handler in the etc/log4j.conf file.

Note the following when creating rulesets:

In absence of a <ruleset-defaults> entry, the following defaults are used:

Ruleset Defaults

Parameter

Default Value

match_action

accept

severity_name

ok

new_message

${raw_message)

show_message

true

auto_clear

false