<commit_before><?xml version="1.0" encoding="UTF-8"?>
<event-translator-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xmlns.opennms.org/xsd/translator-configuration http://www.opennms.org/xsd/config/translator-configuration.xsd ">
  
  <!-- Improved LinkDown/LinkUp events.  Uses translator to add DB information to link status traps events -->
  <translation>
    <event-translation-spec uei="uei.opennms.org/generic/traps/SNMP_Link_Down">
      <mappings>
        <mapping>
          <assignment name="uei" type="field" >
            <value type="constant" result="uei.opennms.org/translator/traps/SNMP_Link_Down" />
          </assignment>
          <assignment name="ifDescr" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfDescr FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
          <assignment name="ifName" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfName FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
          <assignment name="ifAlias" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfAlias FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
        </mapping>
      </mappings>
    </event-translation-spec>
    <event-translation-spec uei="uei.opennms.org/generic/traps/SNMP_Link_Up">
      <mappings>
        <mapping>
          <assignment name="uei" type="field" >
            <value type="constant" result="uei.opennms.org/translator/traps/SNMP_Link_Up" />
          </assignment>
          <assignment name="ifDescr" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfDescr FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
          <assignment name="ifName" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfName FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
          <assignment name="ifAlias" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfAlias FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
        </mapping>
      </mappings>
    </event-translation-spec>
    
    <!-- This translation is predifined for integration with Hyperic-HQ server and the OpenNMS integrations found in
         the $OPENNMS_HOME/contrib/hyperic-integration directory -->
    <event-translation-spec uei="uei.opennms.org/external/hyperic/alert">
      <mappings>
        <mapping>
          <assignment name="uei" type="field" >
            <value type="constant" result="uei.opennms.org/internal/translator/hypericAlert" />
          </assignment>
          <assignment name="nodeid" type="field" >
            <value type="sql" result="SELECT n.nodeid FROM node n WHERE n.foreignid = ? AND n.foreignsource = ?" >
              <value type="parameter" name="platform.id"  matches=".*" result="${0}" />
              <value type="parameter" name="alert.source" matches=".*" result="${0}" />
            </value>
          </assignment>
        </mapping>
      </mappings>
    </event-translation-spec>
  
    <!-- Translations for configuration management -->
    <event-translation-spec uei="uei.opennms.org/vendor/Cisco/traps/ciscoConfigManEvent" >
      <mappings>
        <mapping>
          <assignment name="uei" type="field" >
            <value type="constant" result="uei.opennms.org/internal/translator/entityConfigChanged" />
          </assignment>
          <assignment name="configSource" type="parameter" >
            <!-- ccmHistoryEventCommandSource -->
            <value type="parameter" name="~^\.1\.3\.6\.1\.4\.1\.9\.9\.43\.1\.1\.6\.1\.3\.*" matches=".*" result="${0}" />
          </assignment>
          <assignment name="configUser" type="parameter" >
            <value type="constant" result="Unknown" />
          </assignment>
        </mapping>
      </mappings>
    </event-translation-spec>
    <event-translation-spec uei="uei.opennms.org/vendor/Juniper/traps/jnxCmCfgChange" >
      <mappings>
        <mapping>
          <assignment name="uei" type="field" >
            <value type="constant" result="uei.opennms.org/internal/translator/entityConfigChanged" />
          </assignment>
          <assignment name="configSource" type="parameter" >
            <value type="parameter" name="~^\.1\.3\.6\.1\.4\.1\.2636\.3\.18\.1\.7\.1\.4\.*" matches=".*" result="${0}" />
          </assignment>
          <assignment name="configUser" type="parameter" >
            <value type="parameter" name="~^\.1\.3\.6\.1\.4\.1\.2636\.3\.18\.1\.7\.1\.5\.*" matches=".*" result="${0}" />
          </assignment>
        </mapping>
      </mappings>
    </event-translation-spec>
  
  </translation>

</event-translator-configuration><commit_msg>Fix NMS-5061 entityConfigChange translations not working<commit_after><?xml version="1.0" encoding="UTF-8"?>
<event-translator-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xmlns.opennms.org/xsd/translator-configuration http://www.opennms.org/xsd/config/translator-configuration.xsd ">
  
  <!-- Improved LinkDown/LinkUp events.  Uses translator to add DB information to link status traps events -->
  <translation>
    <event-translation-spec uei="uei.opennms.org/generic/traps/SNMP_Link_Down">
      <mappings>
        <mapping>
          <assignment name="uei" type="field" >
            <value type="constant" result="uei.opennms.org/translator/traps/SNMP_Link_Down" />
          </assignment>
          <assignment name="ifDescr" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfDescr FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
          <assignment name="ifName" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfName FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
          <assignment name="ifAlias" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfAlias FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
        </mapping>
      </mappings>
    </event-translation-spec>
    <event-translation-spec uei="uei.opennms.org/generic/traps/SNMP_Link_Up">
      <mappings>
        <mapping>
          <assignment name="uei" type="field" >
            <value type="constant" result="uei.opennms.org/translator/traps/SNMP_Link_Up" />
          </assignment>
          <assignment name="ifDescr" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfDescr FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
          <assignment name="ifName" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfName FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
          <assignment name="ifAlias" type="parameter">
            <value type="sql" result="SELECT snmp.snmpIfAlias FROM snmpInterface snmp WHERE snmp.nodeid = ?::integer AND snmp.snmpifindex = ?::integer" >
              <value type="field" name="nodeid" matches=".*" result="${0}" />
              <value type="parameter" name="~^\.1\.3\.6\.1\.2\.1\.2\.2\.1\.1\.([0-9]*)$" matches=".*" result="${0}" />
            </value>
          </assignment>
        </mapping>
      </mappings>
    </event-translation-spec>
    
    <!-- This translation is predifined for integration with Hyperic-HQ server and the OpenNMS integrations found in
         the $OPENNMS_HOME/contrib/hyperic-integration directory -->
    <event-translation-spec uei="uei.opennms.org/external/hyperic/alert">
      <mappings>
        <mapping>
          <assignment name="uei" type="field" >
            <value type="constant" result="uei.opennms.org/internal/translator/hypericAlert" />
          </assignment>
          <assignment name="nodeid" type="field" >
            <value type="sql" result="SELECT n.nodeid FROM node n WHERE n.foreignid = ? AND n.foreignsource = ?" >
              <value type="parameter" name="platform.id"  matches=".*" result="${0}" />
              <value type="parameter" name="alert.source" matches=".*" result="${0}" />
            </value>
          </assignment>
        </mapping>
      </mappings>
    </event-translation-spec>
  
    <!-- Translations for configuration management -->
    <event-translation-spec uei="uei.opennms.org/vendor/Cisco/traps/ciscoConfigManEvent" >
      <mappings>
        <mapping>
          <assignment name="uei" type="field" >
            <value type="constant" result="uei.opennms.org/internal/translator/entityConfigChanged" />
          </assignment>
          <assignment name="configSource" type="parameter" >
            <!-- ccmHistoryEventCommandSource -->
            <value type="parameter" name="~^\.1\.3\.6\.1\.4\.1\.9\.9\.43\.1\.1\.6\.1\.3\..*" matches=".*" result="${0}" />
          </assignment>
          <assignment name="configUser" type="parameter" >
            <value type="constant" result="Unknown" />
          </assignment>
        </mapping>
      </mappings>
    </event-translation-spec>
    <event-translation-spec uei="uei.opennms.org/vendor/Juniper/traps/jnxCmCfgChange" >
      <mappings>
        <mapping>
          <assignment name="uei" type="field" >
            <value type="constant" result="uei.opennms.org/internal/translator/entityConfigChanged" />
          </assignment>
          <assignment name="configSource" type="parameter" >
            <value type="parameter" name="~^\.1\.3\.6\.1\.4\.1\.2636\.3\.18\.1\.7\.1\.4\..*" matches=".*" result="${0}" />
          </assignment>
          <assignment name="configUser" type="parameter" >
            <value type="parameter" name="~^\.1\.3\.6\.1\.4\.1\.2636\.3\.18\.1\.7\.1\.5\..*" matches=".*" result="${0}" />
          </assignment>
        </mapping>
      </mappings>
    </event-translation-spec>
  
  </translation>

</event-translator-configuration>
{'fraction_non_alphanumeric': 0.1971326164874552, 'fraction_numerical': 0.023063736948729936, 'mean_word_length': 2.391913319238901, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 2, '>': 219, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1794572', 'n_tokens_mistral': 4286, 'n_tokens_neox': 4050, 'n_words': 694}