Ad Widget

Collapse

SNMP value return as Hexa one

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benoitalbert
    Junior Member
    • May 2017
    • 9

    #1

    SNMP value return as Hexa one

    Hello

    After many search an readings, I have understand that OCTET STRING are returned by snmpget client as hexa value if some unprintable characters are present.
    This behavior is manually avoidable by forcing snmpclient to return ascii output (-Oa parameter).
    I try to configure net-snmp to do so by default, to import MIB and even to add a displey-hint "255a" in the mib TC definition.
    Unfortunately, if unprintable character are present, zabbix still receive hexa value from net-snmp.

    Does anyone already solved this issue ?
    I run zabbix 3.2.4 on Centos 7.
    Net-snmp is installed (devel, libs, utils and agent are present).

    Thx by advance for any help.
  • wick
    Member
    • May 2017
    • 57

    #2
    SNMP value return as Hexa one

    You can certainly change the Data Type as hexadecimal no ?
    Or create a regular expression Result is false with this regex ([0-9 a-fA-F]+)$

    Sorry if I did not understand your request, my English is bad
    Last edited by wick; 17-05-2017, 08:27.

    Comment

    • benoitalbert
      Junior Member
      • May 2017
      • 9

      #3
      Hi wick
      Thx for your answer.
      unfortunately, this is not the case.
      To be exact, I try to retrieve Printer Data using PRINTER-MIB.
      The one which has the issue is the supply Description .
      I do a discover on it (OID 1.3.6.1.2.1.43.11.1.1.6)
      The problem is when there is unprintable character in this description, the result is the following
      SNMPv2-SMI::mib-2.43.11.1.1.6.1.1 = Hex-STRING: 54 6F 6E 65 72 20 6E 6F 69 72
      SNMPv2-SMI::mib-2.43.11.1.1.6.1.2 = Hex-STRING: 55 6E 2E 20 74 72 2E 20 69 6D 61 67 65
      SNMPv2-SMI::mib-2.43.11.1.1.6.1.3 = Hex-STRING: 4B 69 74 20 6D 61 69 6E 74 65 6E 61 6E 63 65
      SNMPv2-SMI::mib-2.43.11.1.1.6.1.4 = Hex-STRING: 4B 69 74 20 72 6F 75 6C 65 61 75

      when the expected result is
      SNMPv2-SMI::mib-2.43.11.1.1.6.1.1 = STRING: "Toner noir"
      SNMPv2-SMI::mib-2.43.11.1.1.6.1.2 = STRING: "Un. tr. image"
      SNMPv2-SMI::mib-2.43.11.1.1.6.1.3 = STRING: "Kit maintenance"
      SNMPv2-SMI::mib-2.43.11.1.1.6.1.4 = STRING: "Kit rouleau"

      I have configure my server (centos 7) so snmpwalk now give me the correct return, but the result is still in Hexa in zabbix

      Comment

      • wick
        Member
        • May 2017
        • 57

        #4
        SNMP value return as Hexa one

        hi,
        hmm ok ^^ i did not understand it at all x)



        I just found this ...
        I'm sorry I can not enlighten you more.

        good luck
        Last edited by wick; 25-07-2017, 09:08.

        Comment

        Working...