Ad Widget

Collapse

Non printable characters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oct
    Junior Member
    • Dec 2009
    • 22

    #1

    Non printable characters

    Hello,

    I'm using Zabbix to monitor several machines through SNMP and found he following problem: if a returned value has a non printable character (such as á, ç, ...) Zabbix shows the value entirely in Hexadecimal. For example, the OID .1.3.6.1.2.1.2.2.1.2.11, wich is ifDescr.11, should return:

    Conexión Intel(R) PRO/1000 MT

    Instead of that, and due to the "ó" character, it returns:

    43 6F 6E 65 78 69 A2 6E 20 64 65 20 72 65 64 20 49 6E 74 65 6C 28 52 29 20 50 52 4F 2F 31 30 30 30 20 4D 54 00

    I know it's not a Zabbix problem but a SNMP issue but, does anybody have an idea of how to ignore non printable characters in SNMP? I'd prefer to receive Conexin Intel(R) PRO/1000 MT or something similar, that the raw hexadecimal string.

    Thanks a lot

    Oct
  • oct
    Junior Member
    • Dec 2009
    • 22

    #2
    More information on the issue. For some reason, Zabbix started to print the string as Conexi?n Intel(R) PRO/1000 MT, wich is good enough. What confuses me is that a Lexmark printer, shoud return for OID .1.3.6.1.2.1.43.11.1.1.6.1.5 (prtMarkerSuppliesDescription.1.5):

    "Caja de desecho de tóner"

    Instead of that, Zabbis shows:

    "43 61 6A 61 20 64 65 20 64 65 73 65 63 68 6F 20 64 65 20 74 A2 6E 65 72"

    If I try with snmpget: snmpget -v 1 -c community Lexmark_printer_IP .1.3.6.1.2.1.43.11.1.1.6.1.5

    I obtain the hexadecimal value. But if I use the -Oa (force output as ASCII): snmpget -Oa -v 1 -c community Lexmark_printer_IP .1.3.6.1.2.1.43.11.1.1.6.1.5

    I get "Caja de desecho de t.ner"

    I have tried to add the -Oa switch in the SNMPDOPTS line inside the /etc/init.d/snmpd script, but it is ignored. Does anybody know how to force the output to be ASCII for all snmp items?

    Thanks

    Oct

    Comment

    Working...