Hello,
  I've encountered a problem when snmptrapd receive a trap, but did not
call the accordingly trap handler defined in /etc/snmptrapd.conf


linux:/var/log # cat /etc/snmptrapd.conf
traphandle .1.3.6.1.6.3.1.1.5.3  /tmp/tt

/tmp/tt is a bash script which will echo a hello.


I issued a trap from an agent:
   snmptrap -v 2c -c public localhost '' .1.3.6.1.6.3.1.1.5.3 ifIndex i
2 ifAdminStatus i 1 ifOperStatus i 1

I've already started the snmptrapd on the client side, waiting for a
trap, when the trap received, it shows below log, but trap handler not
called.
The trap oid in the config file is the one which used to send the trap,
why the handler is not called?
Can somebody help me, thanks a lot!
snmptrapd -c /etc/snmptrapd.conf -d -f -Lo
2009-11-18 12:40:26 NET-SNMP version 5.1 Started.

........................................
Received 120 bytes from 127.0.0.1
0000: 30 76 02 01  01 04 06 70  75 62 6C 69  63 A7 69 02
0v.....public.i.
0016: 04 4F 8A 78  C7 02 01 00  02 01 00 30  5B 30 10 06
.O.x.......0[0..
0032: 08 2B 06 01  02 01 01 03  00 43 04 01  33 D7 CC 30
.+.......C..3..0
0048: 17 06 0A 2B  06 01 06 03  01 01 04 01  00 06 09 2B
...+...........+
0064: 06 01 06 03  01 01 05 03  30 0E 06 09  2B 06 01 02
........0...+...
0080: 01 02 02 01  01 02 01 02  30 0E 06 09  2B 06 01 02
........0...+...
0096: 01 02 02 01  07 02 01 01  30 0E 06 09  2B 06 01 02
........0...+...
0112: 01 02 02 01  08 02 01 01                              ........

2009-11-18 12:40:31 localhost [127.0.0.1]:
SNMPv2-MIB::sysUpTime.0 = Timeticks: (20174796) 2 days, 8:02:27.96
SNMPv2-MIB::snmpTrapOID.0 = OID: IF-MIB::linkDown     IF-MIB::ifIndex =
INTEGER: 2    IF-MIB::ifAdminStatus = INTEGER: up(1)
IF-MIB::ifOperStatus = INTEGER: up(1)
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to