Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9551

Eventd does not respect event configuration order when reloading

    Details

    • Sprint:
      Horizon - July 26th, Horizon - August 2nd

      Description

      When reloading the event configuration dynamically, new event definitions added via the <event-file> elements will be processed after any existing definitions instead of the order in which they are listed.

      To reproduce:

      1) Create etc/events/framerelay.events.xml with:

      <?xml version="1.0"?>
      <events>
      <event>
       <mask>
        <maskelement>
         <mename>id</mename>
         <mevalue>.1.3.6.1.2.1.10.32</mevalue>
        </maskelement>
        <maskelement>
         <mename>generic</mename>
         <mevalue>6</mevalue>
        </maskelement>
        <maskelement>
         <mename>specific</mename>
         <mevalue>1</mevalue>
        </maskelement>
        <varbind>
         <vbnumber>3</vbnumber>
         <vbvalue>3</vbvalue>
        </varbind>
       </mask>
       <uei>uei.opennms.org/IETF/RFC1315/traps/frDLCIStatusDown</uei>
       <event-label>RFC1315-MIB defined trap event: frDLCIStatusChange (Down)</event-label>
       <descr>This trap indicates that the indicated Virtual Circuit %parm[#2]% associated with the ifIndex %parm[#1]% is Down</descr>
       <logmsg dest='logndisplay'>DLCI %parm[#2]% associated with the ifIndex %parm[#1]% is Down</logmsg>
       <severity>Major</severity>
       <alarm-data reduction-key="%uei%:%dpname%:%nodeid%:%parm[#1]%:%parm[#2]%" alarm-type="1" auto-clean="false"/>
      </event>
       
      <event>
       <mask>
        <maskelement>
         <mename>id</mename>
         <mevalue>.1.3.6.1.2.1.10.32</mevalue>
        </maskelement>
        <maskelement>
         <mename>generic</mename>
         <mevalue>6</mevalue>
        </maskelement>
        <maskelement>
         <mename>specific</mename>
         <mevalue>1</mevalue>
        </maskelement>
        <varbind>
         <vbnumber>3</vbnumber>
         <vbvalue>2</vbvalue>
        </varbind>
       </mask>
       <uei>uei.opennms.org/IETF/RFC1315/traps/frDLCIStatusUp</uei>
       <event-label>RFC1315-MIB defined trap event: frDLCIStatusChange (Up)</event-label>
       <descr>This trap indicates that the indicated Virtual Circuit %parm[#2]% associated with the ifIndex %parm[#1]% is Up</descr>
       <logmsg dest='logndisplay'>DLCI %parm[#2]% associated with the ifIndex %parm[#1]% is Up</logmsg>
       <severity>Normal</severity>
       <alarm-data reduction-key="%uei%:%dpname%:%nodeid%:%parm[#1]%:%parm[#2]%" clear-key="uei.opennms.org/IETF/RFC1315/traps/frDLCIStatusDown:%dpname%:%nodeid%:%parm[#1]%:%parm[#2]%" alarm-type="2" auto-clean="false"/>
      </event>
      </events>
      

      2) Add the following entry in etc/eventconf.xml:

        <event-file>events/frame.events.xml</event-file>
      

      before:

        <event-file>events/Standard.events.xml</event-file>
      

      3) Reload the event configuration

      bin/send-event.pl uei.opennms.org/internal/reloadDaemonConfig -p 'daemonName Eventd'
      

      4) Send a trap

      snmptrap -v 1 -c public 127.0.0.1 .1.3.6.1.2.1.10.32 192.168.254.99 6 1 '' .1.3.6.1.2.1.10.32.2.1.1.6.102 i 6 .1.3.6.1.2.1.10.32.2.1.2.6.102 i 102 .1.3.6.1.2.1.10.32.2.1.3.6.102 i 3
      

      Actual behavior: the trap will match the event definition from Standard.events.xml
      Expected behavior: the trap should match the event definition from etc/events/framerelay.events.xml

        Attachments

          Activity

            People

            • Assignee:
              j-white Jesse White
              Reporter:
              j-white Jesse White
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: