DOWNLOAD...
https://github.com/xfguo/pysnmp
https://github.com/xfguo/pysnmp
http://snmplabs.com/pysnmp/
https://pypi.python.org/pypi/pysnmp/#downloads
INSTALL...
tar zxf package-X.X.X.tar.gz
cd package-X.X.X
python setup.py install
tar zxf package-X.X.X.tar.gz
cd package-X.X.X
python setup.py install
or...
pip install pysnmp
or...
easy_install pysnmp
EXAMPLE...
read…
read…
http://www.nealc.com/blog/blog/2013/02/23/writing-an-snmp-agent-with-a-custom-mib-using-pysnmp/
readwrite…
http://www.cloud-rocket.com/2013/08/writing-custom-mib-for-pysnmp-agent/
readwrite…
http://www.cloud-rocket.com/2013/08/writing-custom-mib-for-pysnmp-agent/
1.create mib file MY-MIB
2.convert mib to py...
build-pysnmp-mib -o MY-MIB.py MY-MIB
3.modify ip, get, trap functions
4.stop net-snmp
service snmpd stop
sudo update-rc.d snmpd disable
4.stop net-snmp
service snmpd stop
sudo update-rc.d snmpd disable
5.run example
modify...
ntfOrg = ntforg.NotificationOriginator(self._snmpContext)
to...
ntfOrg = ntforg.NotificationOriginator()
ntfOrg.snmpContext = self._snmpContext
FIREWALL...
sudo iptables -A INPUT -p udp --dport 161 -j ACCEPT
or...
sudo ufw allow 161/udp
or...
sudo ufw allow 161/udp
MIB BROWSER...
http://www.ireasoning.com/downloadmibbrowserfree.php
沒有留言:
張貼留言