hi I'm a 3rd year computing student and I'm currently working on my 3rd year project.
at the moment I'm stuck with what I thought would be a fairly simple task... setting up SNMP...
so far iv managed to get snmpd running on a web-server and snmptrapd working on the monitoring server. [both are running centos 6 and for testing iv took down iptables]
on the server i have the following config.
# Example configuration file for snmptrapd
# No traps are handled by default, you must edit this file!
authCommunity log,execute,net public
traphandle default python /root/project/snmptest.py
# traphandle SNMPv2-MIB::coldStart /usr/bin/bin/my_great_script cold
the above calls a python script when ever it receives an snmp trap. this python script then simply dumps the trap into a text file [this will be expanded upon when I get the web-server sending traps...
running = True
output = open('/tmp/traps', 'a')
input = raw_input()
output.write(input + "\n")
running = False
if __name__ == '__main__':
this system has been tested and works well. it receives traps from my pfsence router fine...
please note that the above i got from this video http://www.youtube.com/watch?v=S0ibDVFnUws
on the webserver i have simply set
this config came from this link...
this allows me use snmpwalk and I get all the oids... but it doesn't send any traps..
I have been googleing how to get the server to send traps when say httpd stops but I can't seem to get an answer..
my current approach i sifting threw the default config to see if i can make out what needs to be done..
dose anyone happen to know of any website or book that would help me out here? or dose anyone have any suggested config that would work?
thank you in advanced