[SNMP4J] Sample code to create SNMP V3 trap
Nair_Mini at emc.com
Nair_Mini at emc.com
Fri Aug 4 23:08:34 CEST 2006
Hi,
Can anyone tell me how I can create SNMP V3 traps using SNMP4J Library? I
can create the v2 traps and I can get the V3 messages right, but when I
tried to send v3 traps, it doesn't work.
This is what I am doing in the code:
targetMIB.addTargetAddress(new OctetString("notification"),
TransportDomains.transportDomainUdpIpv4,
new OctetString(new UdpAddress("127.0.0.1 /
162).getValue()), 200, 1,
new OctetString("notify"), new OctetString("v3"),
StorageType.permanent);
targetMIB.addTargetParams(new OctetString("v3"),
MessageProcessingModel.MPv3,
SecurityModel.SECURITY_MODEL_USM,
new OctetString("MD5DES"),
SecurityLevel.AUTH_NOPRIV,
StorageType.permanent);
notificationMIB.addNotifyEntry(new OctetString("default"),
new OctetString("notify"),
SnmpNotificationMIB.SnmpNotifyTypeEnum.trap,
StorageType.permanent);
I am following everything like Frank has mentioned in the javadocs.
Please anyone let me know how to get the snmp v3 traps working.
Thank you very much,
-Mini
More information about the SNMP4J
mailing list