All pastes #217992 Raw Edit

Unnamed

public text v1 · immutable
#217992 ·published 2006-10-23 22:58 UTC
rendered paste body
<?xml version="1.0" encoding="UTF-8"?>

<event-translator-configuration xmlns="http://xmlns.opennms.org/xsd/translator-configuration" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.opennms.org/xsd/translator-configuration ../src/services/org/opennms/netmgt/config/translator-configuration.xsd ">



<translation>

<event-translation-spec uei="uei.opennms.org/nodes/nodeLostService">



<mappings>

<mapping>

  <!-- This mapping uses the SQL value type to query the DB and change the nodeid of the new event -->

  <assignment type="field" name="nodeid">

                <value                         type="sql"                         result="select node.nodeid from node, ipInterface where node.nodeLabel=(replace((select nodelabel from node where nodeid= ? ),'-mgmt','')) and node.nodeId=ipinterface.nodeid and ipInterface.isManaged != 'D' and node.nodeType != 'D';">

              <value type="field" name="nodeid" />

            </value>

          </assignment>

        </mapping>

      </mappings>

</event-translation-spec>

</translation>

</event-translator-configuration>