Some tips to configure net-snmp in windows?
Ok.
Let assume net-snmp should be installed on the Windows server, where The Dude is running.
1) Download and install by default net-snmp
http://www.net-snmp.org/.
2) Run c:\usr\registertrapd.bat it will setup windows service named "Net-SNMP Trap Handler"
3) Edit C:\usr\etc\snmp\snmptrapd.conf
ignoreauthfailure yes
disableAuthorization yes
authCommunity log,execute,net public
traphandle default C:\Python27\python.exe C:\usr\etc\snmp\handler.py
This will accept traps from any device and will redirect received trap to python script.
handler.py should have following code
import sys
import socket
import time
host='127.0.0.1'
port = 514
trapdata = sys.stdin.read()
# Uncoment for debug
#f = open('c:\snmptrapdlog.txt', 'a')
#f.write("------ " +time.strftime('%X %x') + " ---- New trap received\n")
#f.write(trapdata)
#f.close()
result_trap = ''
for datastr in trapdata.split('\n'):
result_trap = result_trap + datastr + ';\n'
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto(str(result_trap), (host, port))
sock.close()
4) Download and install python 2.7.
http://www.python.org/getit/releases/2.7/
5) Make new log file in The Dude
NewLog.png
6) Make new notification
NewNotif.png
7) Make new syslog rule
syslog_rule.png
8 ) Start "Net-SNMP Trap Handler" or C:\usr\bin\snmptrapd.exe (the last one for debug)
9) The default net SNMP installation has only basic MIB's for Traps. To add more traps for different equipement consult yourself on
http://www.net-snmp.org/ how to add new MIB's support.
10) Read net-snmp documentation to make it more secure or setup firewall.
You do not have the required permissions to view the files attached to this post.