monitor & trap
Xianan s Zhang <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <OFE4209B52.87B9DA83-ON85257164.0015F7E7-88257164.0017B8DE@us.ibm.com> |
I would like to have snmpd sending traps automatically if one file is
larger than a certain size. So I added a few lines to snmpd.conf file,
and the complete snmpd.conf file is attached below.
Then I started snmpd and snmptrapd daemons on localhost. snmptrapd uses a
local file as its log by started as
"/usr/sbin/snmptrapd -u /var/run/snmptrapd.pid -o
/home/shannon/trap.log"
However, there was no trap event saved in the log even if the file is
larger than 1kB, and fileErrorFlag (.1.3.6.1.4.1.2021.15.1.100) has been
set to 1 according to snmpwalk.
I am using net-snmp 5.0.9 since it is included in RedHat distribution, and
we may have to stick to this old version.
Could you please help me if you know what is wrong with my configuration?
Thank you so much.
Shannon
========================================
snmpd.conf
========================================
rwuser notConfigUser
rwcommunity notConfigUser
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
file /home/shannon/snmptest.txt 0.02
trapsink localhost
trap2sink localhost
informsink localhost
trapcommunity notConfigUser
authtrapenable 1
monitor -r 30 "fileSize" .1.3.6.1.4.1.2021.15.1.100 = 1
trapsink localhost
trap2sink localhost
syslocation here
syscontact Shannon
sysservices 72
com2sec notConfigUser default public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view allview included .1.3.6
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
access notConfigGroup "" any noauth exact allview none allview