Reputation: 95
I have for a couple of days been looking for a solution to a problem.
I'm supposed to implement an SNMP agent that is SNMP v2c compliant, but in my quest to get there I have gotten stuck on writing an agent that can serve a manager with a predefined MIB file.
Is there any way for me to load a mib file into my python program and have it serve the OID in the mib. Of course, I know that I need to implement some mechanism to update the values of the OID's as the values in the real world change.
I have been looking at examples and reading the documentation but I don't seem to be able to find a good solution, and some of the examples on the git repository seem to be broken. Also, all the similar questions I have found on stack overflow seem to be outdated as well.
Hope someone can point me to an example that can help me out.
Upvotes: 0
Views: 877
Reputation: 5555
One thing to keep in mind is that MIB file does not contain any values you could serve to your manager. MIB is just a schema, so to speak.
Therefore what you may need to do is to "instantiate" a MIB e.g. do two things:
Let's see what is broken in the pysnmp repo? I'm eager to fix that. ;-)
Upvotes: 1