snmp_exporter icon indicating copy to clipboard operation
snmp_exporter copied to clipboard

Object gets wrong type compared to MIB

Open wwijkander opened this issue 10 months ago • 1 comments

Hey, I'm getting metrics with the help of this MIB: TIMETRA-SERV-MIB.

However, for some reason the object svcDescription which has the syntax ServObjDesc as it is generated in the snmp.yml gets the type OctetString, and not DisplayString. I feel like this should rather be the latter, based on line 247 of the MIB:

ServObjDesc                      ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "ASCII string used to describe various service objects."
    SYNTAX      DisplayString (SIZE (0..80))

I'm using the latest generator in docker.

Using an override as detailed in https://www.robustperception.io/why-is-my-snmp-string-showing-as-hexadecimal/ works, but it feels like this is not intended behavior?

wwijkander avatar Mar 04 '25 13:03 wwijkander

Yes, it seems like we're not recursing the aliased definition of DisplayString syntax.

SuperQ avatar Mar 04 '25 14:03 SuperQ