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

SNMP index returned as number instead of string if there is backslash "\"

    XMLWordPrintable

    Details

    • Team:
      Team C
    • Sprint:
      Sprint 71 (Dec 2020)
    • Story Points:
      1

      Description

      With snmpget i have:

      ABC-MIB::PortActualStatus."E1_RA_01\14" = INTEGER: ok (1)
      

      I have a discovery for MIB table:

      discovery[{#PORTACTUALSTATUS}, ABC-MIB::PortActualStatus]
      

      Item prototype:

      Name: Port Actual Status of  {#SNMPINDEX}
      OID: ABC-MIB::PortActualStatus.{#SNMPINDEX}
      

      Here is the result when I test it in UI:

      [{"{#SNMPINDEX}":"11.69.49.95.82.65.95.48.49.92.49.52","{#PORTACTUALSTATUS}":"1"},{"{#SNMPINDEX}":"11.69.49.95.82.65.95.48.49.92.49.53","{#PORTACTUALSTATUS}":"1"}]
      

      So, I cannot use name of port in item name:

      Port Actual Status of 11.69.49.95.82.65.95.48.49.92.49.53
      

      Expected:

      Port Actual Status of E1_RA_01\14
      

      When I get the same for other OID:

      ABC-MIB::operatorPositionActualStatus."CWP_001" = INTEGER: unknown(4)
      

      It works good:

      [{"{#SNMPINDEX}":"\"CWP_001\"","{#CWACTUALSTATUS}":"4"},{"{#SNMPINDEX}":"\"CWP_002\"","{#CWACTUALSTATUS}":"4"}]
      

      So the difference is "\14" and it seems it is interpreted wrongly.

        Attachments

          Activity

            People

            Assignee:
            arimdjonoks Artjoms Rimdjonoks
            Reporter:
            neogan Andrei Gushchin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: