hey,
iv been working on this for god knows how long and been googleing for the past few months now.... all i seem to come up with is how to setup snmp traps with IOS or snmpwalk info...
I am trying to make an automated monitoring system for my final year computer systems and networking project at university..
currently i have setup a small test bed consisting of a web-server and a monitoring server... on the web-server i have installed snmpd and used the following config file
Code:
com2sec local 127.0.0.1/32 public
com2sec local 192.168.2.0/24 public
trap2sink 192.168.2.51 public
trapsink 192.168.2.51 public
group MyROGroup v1 local
group MyROGroup v2c local
group MyROGroup usm local
view all included .1 80
access MyROGroup "" any noauth exact all none none
rocommunity public
syslocation "North"
syscontact david@the-ward-network.co.uk
###############################################################################
#
# SYSTEM INFORMATION
#
# Note that setting these values here, results in the corresponding MIB objects being 're$
# See snmpd.conf(5) for more details
sysLocation Sitting on the Dock of the Bay
sysContact Me <me@example.org>
# Application + End-to-End layers
sysServices 72
#
# Process Monitoring
#
# At least one 'mountd' process
proc mountd
# No more than 4 'ntalkd' processes - 0 is OK
proc ntalkd 4
# At least one 'sendmail' process, but no more than 10
proc sendmail 10 1
# Walk the UCD-SNMP-MIB::prTable to see the resulting output
# Note that this table will be empty if there are no "proc" entries in the snmpd.conf file
#
# Disk Monitoring
#
# 10MBs required on root disk, 5% free on /var, 10% free on$
disk / 10000
disk /var 5%
includeAllDisks 10%
# Walk the UCD-SNMP-MIB::dskTable to see the resulting output
# Note that this table will be empty if there are no "disk" entries in the snmpd.conf file
#
# System Load
#
# Unacceptable 1-, 5-, and 15-minute load averages
load 12 10 5
on the monitoring server i have setup snmptrapd below
Code:
authCommunity log,execute,net public
traphandle default python /home/creature/snmptest.py
snmptest.py looks like
Code:
def main():
running = True
output = open ('/tmp/traps', 'a')
while running:
try:
input = raw_input()
output.write(input + "\n")
except EOFError:
running = False
output.close()
if __name__ == '__main__':
main()
this code was taken from
http://www.youtube.com/watch?v=S0ibDVFnUws
the only issue is i only seem to be getting uptime alerts and not anything else..... i don't think iv even configured uptime traps in the snmpd.conf file....
can anyone tell me what im doing wrong?? or if what i am doing is even possible??
as far as i can tell no one seems to know.....
thanks in advance