Mapping of SNMP OIDs fails for OIDs starting with the same pattern

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Trivial
    • None
    • Affects Version/s: 5.2.3
    • Component/s: Server (S)
    • None

      Steps to reproduce:

      1. Define two items
        1. snmptrap["SNMPv2-SMI::enterprises.28458.1.57.0.2.100.0.1"]
        2. snmptrap["SNMPv2-SMI::enterprises.28458.1.57.0.2.100.0.11"]
      2. Define Triggers with problem expression
        1. {NDP SNMP Template:snmptrap["SNMPv2-SMI::enterprises.28458.1.57.0.2.100.0.1"].regexp(^.*28458.1.57.1.2.0 type=2 value=INTEGER: 1)}

          =1

        2. {NDP SNMP Template:snmptrap["SNMPv2-SMI::enterprises.28458.1.57.0.2.100.0.11"].regexp(^.*28458.1.57.1.2.0 type=2 value=INTEGER: 1)}

          =1

      3. Send trap SNMPv2-SMI::enterprises.28458.1.57.0.2.100.0.11

      sending trap

      { oid: '1.3.6.1.4.1.28458.1.57.0.2.100.0.11', varBinds: [ \{ oid: '1.3.6.1.4.1.28458.1.57.1.1.0', type: 4, value: '100' }

      ,
      { oid: '1.3.6.1.4.1.28458.1.57.1.2.0', type: 2, value: 1 },

      Result:
      Both traps are triggered and two problems are raised
      Expected:
      Only the 

      {NDP SNMP Template:snmptrap["SNMPv2-SMI::enterprises.28458.1.57.0.2.100.0.1"].regexp(^.*28458.1.57.1.2.0 type=2 value=INTEGER: 1)}

      =1

      should be matched and only one problem should be raised

      The problem seems to be in the regexp used when matching the OID. Maybe the solution should be ending the OID regexp with the "\n" pattern.

      Then, 

      1.3.6.1.4.1.28458.1.57.0.2.100.0.11\n will match but

      1.3.6.1.4.1.28458.1.57.0.2.100.0.1\n will not.

            Assignee:
            Andrey Tocko (Inactive)
            Reporter:
            Enrique Navarro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: