-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Return the pretty name from a referenced OID #96
Comments
Yes, I had to do exactly this. For exactly the same issue of formatting the sysObjectID node.
Example:
Unfortunately, you may need to also abuse the repr function in the snimpy.mib.Node object to get the MIB name. If anyone knows a better way to do this, let us know so I can fix my scripts. |
Thank you. I was looking at doing it in an alternate way like you suggested, but with not being a python expert (or an amateur for that matter) I felt like there was something obvious I was missing. Off the top of my head, I think there are several other Cisco MIBs that pull counters and interface stats and reference other OIDs in similar ways. Overall I really like this library and if there was a way to say "follow the OID" on certain queries that would be extremely useful. |
The only other place that I can think of where the returned data type points to another node is in ENTITY-MIB::entAliasMappingIdentifier. All of the counters should just be plain integer types. Here's another little chunk of code that does something similar:
Example:
|
You're right, I was thinking of the PoE Mib which references entPhysical instead of IfMib for it's interface naming and appends it to the end of the oid. That's a different, but equally annoying, situation. |
We can implement the high level part of this using
Is any of you interested in implementing this? |
I'm working through snimpy to see if it's right for my project and I've got it working but I've run into an issue that I can'f find a solution for. I'm querying sysObjectID and it correctly returns the OID for the system object, but I'd like for it to return the name reference from the MIB. Can this be done?
Here's my code:
Output from the code:
Output from the same OID via snmpget:
Is there a way to get Snimpy to "follow" the reference to the other OID and return the proper name?
The text was updated successfully, but these errors were encountered: