Ad Widget

Collapse

SNMP - value has unknown type [0x44]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ibmco.zabbix
    Junior Member
    • May 2019
    • 9

    #1

    SNMP - value has unknown type [0x44]

    Hi,

    I have one SNMP device which is working fine with native net-snmp get and walk command

    Click image for larger version

Name:	Q1.png
Views:	453
Size:	4.3 KB
ID:	408538​​
    As you can see, SNMP object type for this OID is OPAQUE and the actual data is hex-string which I found this pre-processing javascript to convert it ASCII
    Code:
    var out = "";
    for (var i = 0, nums = value.split(" "); i < nums.length; i++) {
         out += String.fromCharCode(parseInt(nums[i], 16));
    }
    return out;
    Which successfully convert 4E 6F 20 46 61 75 6C 74 ==> No Fault

    But the problem is when I define this OID as an item, the item get error "SNMP - value has unknown type [0x44]"
    I also have tested all "Type of information" (Character, Log, Text) for this item in the configuration panel, but nothing changed

    Click image for larger version

Name:	Q2.png
Views:	406
Size:	8.1 KB
ID:	408539


    I really appreciate it if someone can help me

    Thanks,
    Javad Gorji
  • isaqueprofeta
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2020
    • 154

    #2
    Can you please show the item configuration?

    Comment

    • ibmco.zabbix
      Junior Member
      • May 2019
      • 9

      #3
      Here is item configuration:

      Click image for larger version

Name:	Q3.png
Views:	403
Size:	32.3 KB
ID:	408566

      SNMP Parameters are ok and i can get other OIDs also
      As I said before, I have tested all "Type of information" (Character, Log, Text) for this item but no change!

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        Looks like pure OPAQUE value type is not supported by Zabbix currently.

        Let's see Zabbix code. From the OPAQUE types we are handling
        • ASN_OPAQUE_U64
        • ASN_OPAQUE_I64
        • ASN_OPAQUE_COUNTER64
        • ASN_OPAQUE_FLOAT
        • ASN_OPAQUE_DOUBLE
        which we can see from here:
        Code:
        $ grep ASN_OPAQUE src/zabbix_server/poller/checks_snmp.c
        else if (ASN_UINTEGER == var->type || ASN_COUNTER == var->type || ASN_OPAQUE_U64 == var->type ||
        else if (ASN_COUNTER64 == var->type || ASN_OPAQUE_COUNTER64 == var->type)
        else if (ASN_INTEGER == var->type || ASN_OPAQUE_I64 == var->type)
        else if (ASN_OPAQUE_FLOAT == var->type)
        else if (ASN_OPAQUE_DOUBLE == var->type)
        net-snmp library supports few more OPAQUE value types:
        Code:
        $ egrep -r '^#define ASN_OPAQUE' /usr/include/net-snmp | grep -v LEN
        /usr/include/net-snmp/library/asn1.h:#define ASN_OPAQUE_TAG1 (ASN_CONTEXT | ASN_EXTENSION_ID)
        /usr/include/net-snmp/library/asn1.h:#define ASN_OPAQUE_TAG2 ((u_char)0x30)
        /usr/include/net-snmp/library/asn1.h:#define ASN_OPAQUE_TAG2U ((u_char)0x2f) /* second octet of tag for union */
        /usr/include/net-snmp/library/asn1.h:#define ASN_OPAQUE_COUNTER64 (ASN_OPAQUE_TAG2 + ASN_APP_COUNTER64)
        /usr/include/net-snmp/library/asn1.h:#define ASN_OPAQUE_FLOAT (ASN_OPAQUE_TAG2 + ASN_APP_FLOAT)
        /usr/include/net-snmp/library/asn1.h:#define ASN_OPAQUE_DOUBLE (ASN_OPAQUE_TAG2 + ASN_APP_DOUBLE)
        /usr/include/net-snmp/library/asn1.h:#define ASN_OPAQUE_I64 (ASN_OPAQUE_TAG2 + ASN_APP_I64)
        /usr/include/net-snmp/library/asn1.h:#define ASN_OPAQUE_U64 (ASN_OPAQUE_TAG2 + ASN_APP_U64)
        /usr/include/net-snmp/library/snmp_impl.h:#define ASN_OPAQUE (ASN_APPLICATION | 4) /* changed so no conflict with other includes */
        As you can see in Zabbix there is no mention of ASN_OPAQUE, which is your case (type 0x44 or, in decimal 68).

        I think, since we have preprocessing, we could handle pure OPAQUE values as text and let users convert them if needed. Please create a ZBXNEXT here. I will add more information to it.

        Comment

        • ibmco.zabbix
          Junior Member
          • May 2019
          • 9

          #5
          Thanks for your answer, I have created one issuein ZBXNEXT

          Comment

          Working...