简体   繁体   中英

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

in the faq, i read this "..the agent can also support MIB modules implemented in perl or (from 5.4) python." I have built net-snmp with python support, but it's not clear yet how to actually implement my own MIB module with python now. The python scripts i see in the python directory are related to implementing an snmp client, not an snmp agent. Probably i just miss the point somewhere. Can someone give me a hint on how to get started with this?

Thanks,

Tom

Unfortunately, net-snmp does not yet include support for agent creation in python. If you look at the README in the python directory of the net-snmp source tree, it says,

The 'netsnmp' module provides a full featured, tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) client API.

It looks like they've updated the FAQ and removed any mention of python.

If you are set on using python, you can checkout PySNMP as an alternative. I don't have any personal experience with it but the project is active (the most recent update was in January of this year) and it looks to have most features except AgentX support (so you can't create a subagent that connects to snmpd).

pip中有一个用于编写Python SNMP子代理的AgentX

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM