I have configured net-snmp this way:
/etc/snmp/snmp.conf:
logtimestamp 1
defaultport 161
defversion 2c
defcommunity public
dodebugging 0
dumppacket 1
printNumericOids true
/etc/snmp/snmpd.conf:
trapcommunity public
trap2sink 127.0.0.1 public 162
authtrapenable 1
syscontact [EMAIL PROTECTED]
rocommunity public
rwcommunity private
proc nagios
procfix nagios /sbin/service nagios restart
proc httpd
procfix httpd /sbin/service httpd restart
proc snmpd 1 1
proc snmptrapd 1 1
includeAllDisks 10%
disk / 10%
load 0.08 0.08 0.08
file /var/log/snmpd.log 1
createUser danielcoelho MD5 "danielcoelho"
rouser danielcoelho
rwuser danielcoelho
agentSecName danielcoelho
defaultMonitors yes
linkUpDownNotifications yes
/usr/share/snmp/snmptrapd.conf:
authcommunity log,execute,net public
traphandle default /home/ent/exemplos_cpp/teste3.sh default
# the generic traps
traphandle SNMPv2-MIB::coldStart /home/ent/exemplos_cpp/teste3.sh cold
traphandle SNMPv2-MIB::warmStart /home/ent/exemplos_cpp/teste3.sh warm
traphandle IF-MIB::linkDown /home/ent/exemplos_cpp/teste3.sh down
traphandle IF-MIB::linkUp /home/ent/exemplos_cpp/teste3.sh up
traphandle SNMPv2-MIB::authenticationFailure
/home/ent/exemplos_cpp/teste3.sh auth
# this one is deprecated
traphandle .1.3.6.1.6.3.1.1.5.6 /home/ent/exemplos_cpp/teste3.sh
egp-neighbor-loss
# enterprise specific traps
traphandle TRAP-TEST-MIB::demo-trap /home/ent/exemplos_cpp/teste3.sh
demo-trap
traphandle NOTIFICATION-TEST-MIB::demo-notif
/home/ent/exemplos_cpp/teste3.sh demo-notif
forward default 172.18.50.77:162
forward SNMPv2-MIB::coldStart 172.18.50.77:162
forward SNMPv2-MIB::warmStart 172.18.50.77:162
forward IF-MIB::linkDown 172.18.50.77:162
forward IF-MIB::linkUp 172.18.50.77:162
forward SNMPv2-MIB::authenticationFailure 172.18.50.77:162
forward .1.3.6.1.6.3.1.1.5.6 172.18.50.77:162
forward TRAP-TEST-MIB::demo-trap 172.18.50.77:162
forward NOTIFICATION-TEST-MIB::demo-notif 172.18.50.77:162
forward default 172.18.50.161:162
forward SNMPv2-MIB::coldStart 172.18.50.161:162
forward SNMPv2-MIB::warmStart 172.18.50.161:162
forward IF-MIB::linkDown 172.18.50.161:162
forward IF-MIB::linkUp 172.18.50.161:162
forward SNMPv2-MIB::authenticationFailure 172.18.50.161:162
forward .1.3.6.1.6.3.1.1.5.6 172.18.50.161:162
forward TRAP-TEST-MIB::demo-trap 172.18.50.161:162
forward NOTIFICATION-TEST-MIB::demo-notif 172.18.50.161:162
ignoreauthfailure no
donotlogtraps no
logOption o
Care to comment please?
Daniel Coelho
On 5/29/07, Dave Shield <[EMAIL PROTECTED]> wrote:
On 29/05/07, Daniel Coelho <[EMAIL PROTECTED]> wrote:
> I thought I needed the DisMan Event Handling
> to receive traps...
No.
The DisMan Event handling is used to *generate* traps.
> I want to send a trap to an IP when it occurs.
> For example, when I unplug the network cable,
> I want a trap to be sent to an IP automaticaly.
> The same goes for other kinds of traps that I
> will define, like traps for disk space, raid disks
> and memory usage...
That's exactly what the DisMan Event MIB is
designed to do.
> I have configured the snmp.conf, snmpd.conf
> and snmptrapd.conf files.
But *how* have you configured these files?
Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users