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

Add the full trap oid for v2 snmp event

    XMLWordPrintable

    Details

    • Sprint:
      Horizon 2021 - Aug 4 - 18
    • HB Backlog Status:
      Backlog CM

      Description

      In the case of SNMPv2 traps, the replacement token %id% currently shows only the enterprise id. For example,sending a ciscoIfExtensionMIBNotifications will yield

       

      [root@horizon events]# snmptrap -v2c -c public localhost 0 .1.3.6.1.4.1.9.9.276.0.1 .1.3.6.1.4.1.276.1.1.1 s test
      opennms=> select eventid,eventsnmp,eventuei from events ORDER BY eventid desc;
       eventid | eventsnmp | eventuei
      ---------+-------------------------------------------------+--------------------------------------------------------------
       240 | .1.3.6.1.4.1.9.9.276,undefined,v2,1,6,public | uei.opennms.org/traps/CISCO-IF-EXTENSION-MIB/cieLinkDown
      

       

       
      Log Message

      id = .1.3.6.1.4.1.9.9.276 generic=6 specific=1 SNMP version=v2 SNMP info=.1.3.6.1.4.1.9.9.276,undefined,v2,1,6,public

      Notice that the sub-id 0 is disregarded by OpenNMS. One of our customer's use case is to parse the Log Message field of an event for the full trap oid instead where full trap oid is enterprise id + sub-id + specific id. Many vendors but not all adopt the convention where sub-id = 0. For examples,

      Fortigate - https://oidref.com/1.3.6.1.4.1.12356.101.2.0.301

      F5 - http://oidref.com/1.3.6.1.4.1.3375.2.4.0.12

      Cisco - http://oidref.com/1.3.6.1.4.1.9.9.276.0.1

      Since OpenNMS %id% token is only displaying the enterprise id and there's no other way to display the full trap id without manually hardcoding most of the event files, customer is not able to make use of parsing the logmsg field as parsing the full trap id is required. It would be helpful for customer if one additional token can be added to distinguish between the more generic %id% token and the more SNMPv2 specific full trap oid token.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cgorantla Chandra Gorantla
              Reporter:
              jylee JianYet
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                HB Grooming Date:

                  Git Integration