snmptrapd skips "traphandle" line that are not "default" from the snmptrapd.conf file.

Daniel Leicht <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,
I'm having a problem making the snmptrapd behave the way I would like it to.
I'm trying to catch a specific OID, but can't really do so:

this is my snmptrapd.conf:
authCommunity log,execute,net public
authCommunity log,execute,net private

logoption f /var/log/snmp-received.log

traphandle  .1 /home/daniel/NMS/web/alert_trapper.py
traphandle  SNMPv2-MIB::snmpTrapOID.0.0.17
 /home/daniel/NMS/web/alert_trapper.py
traphandle  SNMPv2-MIB::snmpTrapEnterprise.0
/home/daniel/NMS/web/alert_trapper.py
traphandle  SNMPv2-MIB::snmpTrapOID /home/daniel/NMS/web/alert_trapper.py
traphandle  .1.3.6.1.6.3.1.1.4.1.0.0.17
/home/daniel/NMS/web/alert_trapper.py
traphandle  .1.3.6.1.6.3.1.1.4.1.0 /home/daniel/NMS/web/alert_trapper.py
traphandle  SNMPv2-MIB::snmpTrapOID.0  /home/daniel/NMS/web/alert_trapper.py
traphandle  iso.5.4.2.2.2 /home/daniel/NMS/web/alert_trapper.py
traphandle  .1.5.4.2.2.2 /home/daniel/NMS/web/alert_trapper.py
traphandle  .1.3.6.1.6.3.1.1.4 /home/daniel/NMS/web/alert_trapper.py
#traphandle  default /home/zabbix/zabbix-1.8.2/misc/snmptrap/snmptrap.sh
#traphandle  default /home/daniel/NMS/web/alert_trapper.py

There are lots of "traphandle" lines above, but none of them could catch
this one:
 /usr/bin/snmptrap -v 1 -c public 10.0.0.141 1.5.4.2.2.2 localhost 6 17 ''
1.5.4.2.2.2.1 s "Hello"

If I uncomment the last traphandle line (the default one), it will catch it,
and call the handler twice for some reason.
Somebody knows why?

No matter what I tried to do, it wouldn't catch anything besides from the
unspecific default handler.

Maybe I'm missing something?
I can see in the log that it sees the trap:
2010-08-18 16:55:29 localhost [127.0.0.1] (via UDP:
[10.0.0.141]:34903->[10.0.0.141]) TRAP, SNMP v1, community public
        iso.5.4.2.2.2 Enterprise Specific Trap (17) Uptime: 2 days,
0:33:42.88
        iso.5.4.2.2.2.1 = STRING: "wazzup?"

Thanks in advance,
Daniel.

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.