[SNMP4J] About SNMP4J
Mauricio Reyes
maure5 at hotmail.com
Wed Feb 23 05:37:36 CET 2005
Hello Frank,
Thanks a lot for the fast answer. The solution you suggested worked
perfectly.
But now I have other general questions:
1. SNMP4J prints the traps in it numeric form. Is there a way to map the
numbers to some verbal representation of the objects? So that the object
name is displayed instead of the numeric value?
2. I've searched through the code to try and find where are the traps
received and printed to the screen. I'd like to know this so that I can
extract the trap and use it to do some calculations. Can you please indicate
me how to do this?
3. I have some problems sending a SNMPv3 trap to net-snmp. The tools
provided by net-snmp work fine with each other. I can receive SNMPv3 traps.
I need to send v3 traps (with authPriv) to the snmptrapd (net-snmp) demon
that receives traps. I'm using the tool provided like this:
C:\Documents and Settings\Nest\Desktop\snmp4j\snmp4j_tool\snmp4j_tool>java
-cp .
;./SNMP4J.jar;../../lib/log4j-1.2.7.jar org.snmp4j.tools.console.SnmpRequest
-p
TRAP -v 3 -u mtest -a MD5 -A mprueba -x DES -X mprueba 127.0.0.1/162 "1.3.
6.1.2.1.1.3.0={t}0" "1.3.6.1.6.3.1.1.4.1.0={o}1.3.6.1.6.3.1.1.5.1"
"1.3.6.1.2.1.
1.1.0={s}System XYZ, Version N.M"
Program enters SnmpRequest contructor to test
TRAP sent successfully
But on the side of the snmptrapd I get:
C:\usr>snmptrapd -f -Le -Dusm
usmUser: created a new user mtest at 01 02 03 04 06
2005-02-22 23:03:08 NET-SNMP version 5.2.1 Started.
usm: USM processing begun...
usm: Unknown User(mtest)
In the snmptrapd.conf file (I hope you are familiar with it) I have this:
rwuser initial
# lets add the new user we'll create too:
rwuser mtest
# USM configuration entries
createUser -e 0x0102030406 mtest MD5 mprueba DES mprueba
I don't know why traps aren't received. I tried changing the engineID (to
other numbers), but got the same, also varying some parameters. If I send a
SNMPv2c trap it is received well. I don't know if the problem is with the
engineID or not. Both applications run on the same computer.
Thanks a lot for your attention.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the SNMP4J
mailing list