Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generator populating OID types differently than net-snmp #520

Closed
maemigh opened this issue May 15, 2020 · 4 comments
Closed

generator populating OID types differently than net-snmp #520

maemigh opened this issue May 15, 2020 · 4 comments

Comments

@maemigh
Copy link

maemigh commented May 15, 2020

Host operating system: output of uname -a

Linux tesla 3.10.0-1127.el7.x86_64 #1 SMP Tue Feb 18 16:39:12 EST 2020 x86_64 x86_64 x86_64 GNU/Linux

snmp_exporter version: output of snmp_exporter -version

./snmp_exporter -version
snmp_exporter: error: unknown short flag '-v', try --help

What device/snmpwalk OID are you using?

Dell iDRAC 8

If this is a new device, please link to the MIB(s).

iDRAC-SMIv2.mib link

What did you do that produced an error?

Generator sets type of StringType OIDs as OctetString

What did you expect to see?

DisplayString
snmpget shows the value properly
ex:
IDRAC-MIB-SMIv2::systemOSName.0 = STRING: "VMware ESXi"
This seems to happen for all string values

What did you see instead?

generator sets the type as OctetString and output appears as gauge

# HELP systemOSName This attribute defines the name of the operating system that the host is running. - 1.3.6.1.4.1.674.10892.5.1.3.6
# TYPE systemOSName gauge
systemOSName{systemOSName="0x564D776172652045535869"} 1
@brian-brazil
Copy link
Contributor

StringType is an OCTET STRING, this behaviour is correct. If the vendor wanted it to be treated as ASCII, they should have specified that in the MIB.

@maemigh maemigh changed the title generator populating OID types incorrectly generator populating OID types differently than net-snmp May 15, 2020
@maemigh
Copy link
Author

maemigh commented May 15, 2020

Perhaps I have the details wrong. Nevertheless, behavior doesn't appear to be following that of net-snmp

@brian-brazil
Copy link
Contributor

Net-snmp appears to use a heuristic rather than what the MIB says, we follow the MIB - as it wouldn't be correct to do anything else. The MIB says it's a binary string, so we handle it as a binary string.

@brian-brazil
Copy link
Contributor

Closing, as there's no bug here. We're doing exactly what the MIB tells us to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants