Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-14576

IPv6 SNMPv3 zabbix_trap_receiver.pl prints malformed log file

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • 3.0.18
    • Server (S)
    • None
    • Ubuntu 16.04

      Steps to reproduce:

      I have installed Zabbix 3.0.18 on Ubuntu 16.04. I am using "zabbix_trap_receiver.pl" to handle my traps and I have configured the file this way:

      /etc/snmp/snmptt.conf

      EVENT general .* "General Event" Normal
      FORMAT ZBXTRAP $aA $aA severity: $s $Fn + $*
      

       

      which is following Zabbix trap format:

      [timestamp] [the trap, part 1] ZBXTRAP [address] [the trap, part 2]
      

       

      When I send traps via IPv4/IPv6 with SNMPv2 I can see the trap in Zabbix properly (pic attached as well)

      2018-07-05 15:26:30 
      15:26:29 2018/07/05 PDU INFO:
       receivedfrom UDP/IPv6: [2607:f160:a:f0:9:fe0:0:2000]:1096
       errorindex 0
       messageid 0
       community public
       notificationtype TRAP
       transactionid 18
       errorstatus 0
       requestid 0
       version 0
      VARBINDS:
       .1.3.6.1.2.1.1.3.0 type=67 value=Timeticks: (23993228) 2 days, 18:38:52.28
       .1.3.6.1.6.3.1.1.4.1.0 type=6 value=OID: .1.3.6.1.4.1.232.0.11003
       .1.3.6.1.2.1.1.5.0 type=4 value=STRING: "TXSLPERFLAB-H-PE0C7O1-001"
       .1.3.6.1.4.1.232.11.2.11.1 type=2 value=INTEGER: 4
       .1.3.6.1.4.1.232.11.2.8.1 type=4 value=STRING: "HPE Onboard Administrator Test Trap sent from enclosure: TXSLPERFLAB-001"
       .1.3.6.1.6.3.18.1.3.0 type=64 value=IpAddress: 192.168.80.33
       .1.3.6.1.6.3.18.1.4.0 type=4 value=STRING: "public"
       .1.3.6.1.6.3.1.1.4.3.0 type=6 value=OID: .1.3.6.1.4.1.232
      

      Problem occurs when I use IPv6 with SNMPv3 the Zabbix trap info get cut off in the middle see below 2 traps below (picture attached as well):

       2018-07-05 15:34:38 
      15:34:37 2018/07/05 PDU INFO:
       requestid {color:#654982}783365081{color}
       version 
       3
      
      2018-07-05 15:24:20 
      15:24:18 2018/07/05 PDU INFO:
       securitymodel 3
       messageid {color:#f79232}807769804{color}
       errorindex 0
       receivedfrom UDP/IPv6: [2607:f160:a:f0:9:fe0:0:2002]:1234
       securityName zabbix
       securitylevel 3
       contextName
      

      Comparing with the /tmp/zabbix_traps.tmp output I see some garbage characters (<80>@@^K^D) inserted on the securityEngineID and contextEngineID lines, seems to be character encoding issues please see red highlights text below:

       15:34:37 2018/07/05 ZBXTRAP 2607:f160:a:f0:9:fe0:0:2002
      PDU INFO:
       requestid {color:#654982}783365081{color}
       version 3
       securityEngineID {color:#d04437}<80>^@^@^K^D{color}74:46:a0:f9:d9:70
       notificationtype TRAP
       errorstatus 0
       transactionid 20
       contextEngineID {color:#d04437}<80>^@^@^K^D{color}74:46:a0:f9:d9:70
       securitymodel 3
       messageid 807769806
       securityName zabbix
       securitylevel 3
       receivedfrom UDP/IPv6: [2607:f160:a:f0:9:fe0:0:2002]:1234
       errorindex 0
       contextName 
      VARBINDS:
       .1.3.6.1.2.1.1.3.0 type=67 value=Timeticks: (24039431) 2 days, 18:46:34.31
       .1.3.6.1.6.3.1.1.4.1.0 type=6 value=OID: .1.3.6.1.4.1.232.0.11003
       .1.3.6.1.2.1.1.5.0 type=4 value=STRING: "TXSLPERFLAB-H-PE0C7O1-002"
       .1.3.6.1.4.1.232.11.2.11.1 type=2 value=INTEGER: 4
       .1.3.6.1.4.1.232.11.2.8.1 type=4 value=STRING: "HPE Onboard Administrator Test Trap sent from enclosure: TXSLPERFLAB-002"
       .1.3.6.1.6.3.1.1.4.3.0 type=6 value=OID: .1.3.6.1.4.1.232
      
       15:24:18 2018/07/05 ZBXTRAP 2607:f160:a:f0:9:fe0:0:2002
      PDU INFO:
       securitymodel 3
       messageid {color:#f79232}807769804{color}
       errorindex 0
       receivedfrom UDP/IPv6: [2607:f160:a:f0:9:fe0:0:2002]:1234
       securityName zabbix
       securitylevel 3
       contextName 
       securityEngineID {color:#d04437}<80>^@^@^K^D{color}74:46:a0:f9:d9:70
       version 3
       requestid 783365079
       transactionid 17
       errorstatus 0
       notificationtype TRAP
       contextEngineID {color:#d04437}<80>^@^@^K^D{color}74:46:a0:f9:d9:70
      VARBINDS:
       .1.3.6.1.2.1.1.3.0 type=67 value=Timeticks: (23977577) 2 days, 18:36:15.77
       .1.3.6.1.6.3.1.1.4.1.0 type=6 value=OID: .1.3.6.1.4.1.232.0.11003
       .1.3.6.1.2.1.1.5.0 type=4 value=STRING: "TXSLPERFLAB-H-PE0C7O1-002"
       .1.3.6.1.4.1.232.11.2.11.1 type=2 value=INTEGER: 4
       .1.3.6.1.4.1.232.11.2.8.1 type=4 value=STRING: "HPE Onboard Administrator Test Trap sent from enclosure: TXSLPERFLAB-002"
       .1.3.6.1.6.3.1.1.4.3.0 type=6 value=OID: .1.3.6.1.4.1.232
      

       

      Result:
      zabbix_traps.tmp attached 

      Expected:
      See screenshot attached

        1. bug_text.txt
          5 kB
        2. zabbix_snmpv2_traps_working.JPG
          zabbix_snmpv2_traps_working.JPG
          68 kB
        3. zabbix_snmpv3_traps_cut_off.JPG
          zabbix_snmpv3_traps_cut_off.JPG
          37 kB
        4. zabbix_trap_receiver.pl
          4 kB
        5. zabbix_traps.tmp
          33 kB

            Unassigned Unassigned
            Zeemon Simon Leung
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: