-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Telegraf 1.21.1: Marshal error with SNMP PowerNet MIB #10304
Comments
+1!! Just come across this post, I wish I find it sooner and it can save my afternoon of troubleshooting! I was scratching my head trying to figure out what's wrong as well!! I found the actual error message is generated by "gosnmp" and I opened a ticket over there |
I am unsure if the actual issue is in gosmnp, or in the way telegraf interacts with it, which is why I opened a ticket here first. |
@Doridian same here... I went down the rabbit hole trying to figure out what's wrong as well. This leads me to believe something to do with gosnmp Yea, I hope someone from the team can take a look and get back to us. For the longest time, I was wondering what's "marshalPDU", in my world PDU stands for Power Distribution Unit and I thought it was some error in the MIB files, and I can't find any "marshal" brand info... 😅 |
@Doridian Thank you for noticing this! I am trying my best to get to the bottom of it I will keep you guys updated and appreciate your patience as well as opening a ticket with gosnmp :) |
I do not believe this is an issue with |
Due to the holidays coming up the team will not have time to have another bug release. There are a few options while you wait for this fix:
Thank you for your continued support of Telegraf and for your patience with this switch to |
The library owner of |
@MyaLongmire The odd thing is, I copied some of the gosmi code from telegraf into a standalone script to play around with. If I load that up, it comes back with the OID just fine, just telegraf for some reason does not. Maybe I load the folders in a different order, but the MIBs must exist somehow. I can try fiddling some more to see if I can get a minimal code snippet to actually reproduce the blank-ness. |
I tried to simplify telegraf code just for testing |
I finally managed to reproduce the issue. It is order dependant! |
I just found that if you put them in the same folder it works. Any idea on the best order to load them in? |
I think I fond a possible fix for this issue. I have changed the function so that it first appends all paths to gosmi, and only at the end places the See attached file. |
The pr for this is now up! If you would give it a test just to be sure it works. Thank you so much for all of your help with this! |
Relevent telegraf.conf
System info
Telegraf 1.21.1
Docker
No response
Steps to reproduce
2021-12-18T08:06:00Z E! [inputs.snmp] Error in plugin: agent SNIP: performing get on field model: marshal: marshalPDU: unable to marshal varbind list: unable to marshal OID: Invalid object identifier
Expected behavior
It works
Actual behavior
2021-12-18T08:06:00Z E! [inputs.snmp] Error in plugin: agent SNIP: performing get on field model: marshal: marshalPDU: unable to marshal varbind list: unable to marshal OID: Invalid object identifier
Additional info
This uses the PowerNet MIB from APC's website: https://www.apc.com/shop/us/en/products/PowerNet-MIB-v4-3-2/P-SFPMIB432
There is no errors loading the MIB, and playing around with gosmi's commandline tools and small test programs with it, it seems to be able to translate the descriptions to OIDs correctly.
This used to work before the switch to gosmi. Other MIBs (such as UPS-MIB) work fine.
Also worthy of note if I replace the string representations (
PowerNet-MIB::...
) with their full numeric representation, these errors vanishThe text was updated successfully, but these errors were encountered: