Reduction key
Subscribe

From OpenNMS

Jump to: navigation, search

OpenNMS Event Reduction Keys

The <reductionKey> tag is added to Events defined in the event-configuration.xml file in order to:

  1. Identify the Event as an Alarm
  2. Used to reduce (de-duplicate) the Event in the Alarms table.

The reductionKey is also a column in the Alarms table where it is persisted (stored). This column has a unique index constraint that prevents duplication of alarms and speeds up reduction searches.

The granularity of the reductionKey determines the amount of reduction (see examples below). If a reductionKey is configured to only contain the node ID associated with the Event, then every Event for that node will be reduced. Going the other direction, if the Event time is added to the reductionKey, then only Events with the same nodedid that occur at exact same time (in milliseconds) will be reduced.

Example 1 - little granularity:

<reductionKey>%nodeid%</reductionKey>
<alarm-data reduction-key="%nodeid%" alarm-type="1" />

Example 2 - much granularity:

<reductionKey>%nodeid%:%time%</reductionKey>
<alarm-data reduction-key="%nodeid%:%time%" alarm-type="1" />

Example 3 - clearing alarm (see Automations):

<alarm-data reduction-key="%nodeid%" alarm-type="2" clear-uei="uei.opennms.org/nodes/nodeDown" />

The reductionKey value can also be a literal (in example 2 the literal is ':') combined with any one of the event parameters.