From: SourceForge.net <no...@so...> - 2003-12-23 22:00:17
|
Bugs item #865178, was opened at 2003-12-23 17:00 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=865178&group_id=12694 Category: apps Group: None Status: Open Resolution: None Priority: 5 Submitted By: Aaron Daubman (daubman) Assigned to: Nobody/Anonymous (nobody) Summary: Discrepancies in SNMPv1 versus v2 traps sent to traphandler Initial Comment: SNMPv1 traps do NOT send the sysUpTime or trap OID to the traphandle script (see below for output) even though the uptime/trap OID ARE displayed in the console output. Also, with snmptrapd run in foreground, logging to stderr (or stdout), I see the trap come in, but the traphandle script's output does not get displayed. Part 1 - the configs: # cat snmptrapd.conf traphandle default /usr/bin/tee -a /usr/local/jffnms/logs/traps.log Notes: tee should send the input from the trap both to stdout as well as appended (-a) to the logfile. Part 2 - the daemon: # snmptrapd -C -c ./snmptrapd.conf -f -Le -n -On 2003-12-23 15:53:11 NET-SNMP version 5.1 Started. Notes: -C makes sure no other conf is read, -f keeps it in foreground, -Le replaces -P in version 5.1 to log to stderr, -n=no DNS, -On = numeric OIDs Part 3 - generate trap: snmptrap -v 1 -c public localhost enterprises localhost 3 0 '' ifIndex.1 i 1 Part 4 - check for receipt of trap: This is what the snmptrapd console shows (notice no script output): 2003-12-23 15:53:11 NET-SNMP version 5.1 Started. 2003-12-23 15:55:04 127.0.0.1(via 127.0.0.1) TRAP, SNMP v1, community public .1.3.6.1.4.1 Link Up Trap (0) Uptime: 1:0 .1.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1 Part 5 - view log: This is what is in the logfile (from tee) - notice no uptime or trap OID... just the linkup OID: 127.0.0.1 127.0.0.1 .1.3.6.1.2.1.2.2.1.1.1 1 Lastly: If I generate an SNMPv2c trap via: snmptrap -v 2c -c public localhost 0 .1.3.6.1.6.3.1.1.5.3 .1.3.6.1.2.1.2.2.1.1.1 i 1 I get the correct entry in the log (still not on snmptrapd console output) Notice I get Host, IP, UPTIME, TrapOID, and THEN the linkdown 127.0.0.1 127.0.0.1 .1.3.6.1.2.1.1.3.0 0:0:00:00.00 .1.3.6.1.6.3.1.1.4.1.0 .1.3.6.1.6.3.1.1.5.3 .1.3.6.1.2.1.2.2.1.1.1 1 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=865178&group_id=12694 |