Ad Widget

Collapse

SNMP Octet-string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • avorobyev
    Junior Member
    • Dec 2017
    • 3

    #1

    SNMP Octet-string

    Hi!
    I've got troubles getting correct octet-string values from printer.
    Trying to get OCTET STRING values from printer (hrPrinterDetectedErrorState)

    item configuration is on the attached picture.

    The problem is that
    * sometimes values are returned as OCTET STRING, correctly parsed by Zabbix and put into database
    * sometimes values are returned as STRING that seem like OCTET STRING (0..9A..F) and put into database incorrectly
    * sometimes values are returned as STRING that do not seem like octet, and no values put into database.

    as explained here, http://net-snmp.sourceforge.net/wiki...from_the_tools, smnp tools use isprint() function to determine the way it shows the OCTET STRING value, but zabbix doesn't analyse the output of the snmp and always uses the value as-is.

    Here's the test runs of snmpwalk over the OID.

    (The same values in hex (-Ox) and ascii (no snmp switches))
    root@msk-zbx:/usr/share/mibs/ietf# snmpwalk -mALL -v1 -Ox -cpublic 192.168.0.75 hrPrinterDetectedErrorState
    HOST-RESOURCES-MIB::hrPrinterDetectedErrorState.1 = Hex-STRING: 40

    root@msk-zbx:/usr/share/mibs/ietf# snmpwalk -mALL -v1 -cpublic 192.168.0.75 hrPrinterDetectedErrorState
    HOST-RESOURCES-MIB::hrPrinterDetectedErrorState.1 = STRING: "@"

    (another state of printer, wrongly seen as hex value A)
    root@msk-zbx:/usr/share/mibs/iana# snmpwalk -mALL -v1 -cpublic 192.168.0.75 hrPrinterDetectedErrorState
    HOST-RESOURCES-MIB::hrPrinterDetectedErrorState.1 = STRING: "A"

    QUESTION:
    Is there a way to force Zabbix using -Ox key when getting HEX values from SNMP devices?


    Zabbix 2.4 I know it's rather old and unsupported, have things changed since then?
    Attached Files
  • kaspars.mednis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2017
    • 349

    #2
    Hi,

    i have replicated your issue, Zabbix3.4 can handle this situation just fine with preprocessing.
    I have tested it with Zabbix trapper item, sending string values as HEX (see screenshots)

    Can you upgrade to Zabbix 3.4 ? this process is automated, it can just take some time with large DBs

    Direct upgrade to Zabbix 3.4 is possible from Zabbix 3.2.x, 3.0.x, 2.4.x, 2.2.x and 2.0.x. For upgrading from earlier versions consult Zabbix documentation for 2.0 and earlier.
    Regards,
    Kaspars
    Attached Files

    Comment

    • avorobyev
      Junior Member
      • Dec 2017
      • 3

      #3
      thanks for your reply. I'll have to schedule the upgrade of the system.
      I'll write back when finished.

      Comment

      Working...