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

Event Translator debug logging is incorrect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 26.2.2
    • Fix Version/s: 27.0.0
    • Component/s: Event Translator
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Sprint:
      Horizon 2020 - Oct 14-Oct 28, Horizon 2020 - Oct 28-Nov 11
    • HB Backlog Status:
      Backlog CM

      Description

      After working several customer issues involving the event translator, i noticed it logs both the originating event and the translated event in DEBUG:

      2020-10-15 14:59:46,893 DEBUG [event-translator-Thread] o.o.n.t.EventTranslator: onEvent: received valid register ed translation event: Event:
       CreationTime: Thu Oct 15 14:59:46 CDT 2020
       Dbid: 667841
       Descr: <p>A linkDown trap signifies that the sending protocol entity recognizes a failure in one of the
                  communication link represented in the agent's
                  configuration. The data passed with the event are 1) The name and value of the ifIndex instance for the
                  affected interface. The name of the
                  interface can be retrieved via an snmpget of .1.3.6.1.2.1.2.2.1.2.INST, where INST is the instance returned
                  with the trap.</p>
                  all = .1.3.6.1.2.1.2.2.1.1.10146="10146" .1.3.6.1.2.1.2.2.1.2.10146="GigabitEthernet0/46" .1.3.6.1.2.1.2.2.1.3.10146="6" .1.3.6.1.4.1.9.2.2.1.1.20.10146="down"
                  ifName = GigabitEthernet0/46
       DistPoller: 00000000-0000-0000-0000-000000000000
       Host: 192.168.1.190
       Interface: 192.168.1.190
       Logmsg: {"_content":"Agent Interface Down (linkDown Trap)
              ","_notify":true,"_dest":"logndisplay"}
       Mask: {"_maskelementList":[{"_mename":"generic","_mevalueList":[2]}]}
       Nodeid: 23
       Parms: {
        .1.3.6.1.2.1.2.2.1.1.10146 = Int32(text): 10146
        .1.3.6.1.2.1.2.2.1.2.10146 = OctetString(text): GigabitEthernet0/46
        .1.3.6.1.2.1.2.2.1.3.10146 = Int32(text): 6
        .1.3.6.1.4.1.9.2.2.1.1.20.10146 = OctetString(text): down
       }
       Severity: Minor
       Snmp: Snmp: Version: v2
      TimeStamp: Wed Dec 31 20:23:09 CST 1969
      Community: public
      Generic: 2
      Specific: 0
      Id: .1.3.6.1.6.3.1.1.5.3
      End Snmp
      
       Snmphost: 192.168.1.190
       Source: trapd
       Time: Thu Oct 15 14:59:46 CDT 2020
       Uei: uei.opennms.org/generic/traps/SNMP_Link_Down
      End Event
      
      2020-10-15 14:59:46,893 DEBUG [event-translator-Thread] o.o.n.t.EventTranslator: onEvent: sended translated event: Event:
       CreationTime: Thu Oct 15 14:59:46 CDT 2020
       Dbid: 667841
       Descr: <p>A linkDown trap signifies that the sending protocol entity recognizes a failure in one of the
                  communication link represented in the agent's
                  configuration. The data passed with the event are 1) The name and value of the ifIndex instance for the
                  affected interface. The name of the
                  interface can be retrieved via an snmpget of .1.3.6.1.2.1.2.2.1.2.INST, where INST is the instance returned
                  with the trap.</p>
                  all = .1.3.6.1.2.1.2.2.1.1.10146="10146" .1.3.6.1.2.1.2.2.1.2.10146="GigabitEthernet0/46" .1.3.6.1.2.1.2.2.1.3.10146="6" .1.3.6.1.4.1.9.2.2.1.1.20.10146="down"
                  ifName = GigabitEthernet0/46
       DistPoller: 00000000-0000-0000-0000-000000000000
       Host: 192.168.1.190
       Interface: 192.168.1.190
       Logmsg: {"_content":"Agent Interface Down (linkDown Trap)
              ","_notify":true,"_dest":"logndisplay"}
       Mask: {"_maskelementList":[{"_mename":"generic","_mevalueList":[2]}]}
       Nodeid: 23
       Parms: {
        .1.3.6.1.2.1.2.2.1.1.10146 = Int32(text): 10146
        .1.3.6.1.2.1.2.2.1.2.10146 = OctetString(text): GigabitEthernet0/46
        .1.3.6.1.2.1.2.2.1.3.10146 = Int32(text): 6
        .1.3.6.1.4.1.9.2.2.1.1.20.10146 = OctetString(text): down
       }
       Severity: Minor
       Snmp: Snmp: Version: v2
      TimeStamp: Wed Dec 31 20:23:09 CST 1969
      Community: public
      Generic: 2
      Specific: 0
      Id: .1.3.6.1.6.3.1.1.5.3
      End Snmp
      
       Snmphost: 192.168.1.190
       Source: trapd
       Time: Thu Oct 15 14:59:46 CDT 2020
       Uei: uei.opennms.org/generic/traps/SNMP_Link_Down
      End Event
      

      However, the output for the "sended translated event" just prints the original event again. This makes debugging the event translator difficult.

        Attachments

          Activity

            People

            Assignee:
            dino2gnt Dino Yancey
            Reporter:
            dino2gnt Dino Yancey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration