How to implement mib module in net-snmp using python?

in faq, I read this "... the agent can also support MIB modules implemented in perl or (from 5.4) python". I created net-snmp with python support, but it is not yet clear how to actually implement my own MIB module using python. The python scripts that I see in the python directory are related to the snmp client implementation, not the snmp agent. I guess I just missed something. Can someone give me a hint on how to get started with this?

Thanks,

Tom

+4
source share
2 answers

Unfortunately, net-snmp has not yet included support for creating an agent in python. If you look at README in the python directory of the net-snmp source tree, it says:

The netsnmp module provides a fully functional, trilingual SNMP client API (SNMPv3, SNMPv2c, SNMPv1).

It seems like they have updated the frequently asked questions and removed all references to python.

If you are configured to use python, you can check out PySNMP as an alternative. I have no personal experience, but the project is active (the last update was in January of this year), and it looks like most functions except AgentX support (therefore, you cannot create a subagent that connects to snmpd).

+3
source

The pip application has an AgentX library for writing sub-agents of the Python routine.

0
source

Source: https://habr.com/ru/post/1305886/


All Articles