Reduction key
Subscribe

From OpenNMS

Jump to: navigation, search

OpenNMS Event Reduction Keys

The reduction-key parameter of the <alarm-data> 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 reduction key is also a column (reductionKey) 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 reduction key determines the amount of reduction (see examples below). If a reduction key 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 reduction key, then only Events with the same nodedid that occur at exact same time (in milliseconds) will be reduced.

Example 1 - little granularity:

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

Example 2 - much granularity:

<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 reduction key value can also be a literal (in example 2 the literal is ':') combined with any one of the Event_Configuration_How-To#Elements.