[SNMP4J] How to send notifications and traps
Vinayagam Natarajan
vinayagam84 at yahoo.com
Mon Jul 30 14:51:03 CEST 2007
Hi All,
I am designing a customized agent for our mib. Our mib
is v2c complaint, so we need to send traps for some
critical situations and notification for some of the
normal situations. I added traps and notifications in
TargetMIB's TargetAddress as shown below
String sIPAddress = destAddr + "/" +
FarmerImpl.snmpTrapPort;
String temp = destAddr + "/" + "trap";
agent.getSnmpTargetMIB().addTargetAddress(new
OctetString(temp),
TransportDomains.transportDomainUdpIpv4,
new OctetString(new
UdpAddress(sIPAddress).getValue()), 200, 1, new
OctetString("trap"),
new OctetString("v1"),
StorageType.permanent);
temp = destAddr + "/" + "inform";
agent.getSnmpTargetMIB().addTargetAddress(new
OctetString(temp),
TransportDomains.transportDomainUdpIpv4,
new OctetString(new
UdpAddress(sIPAddress).getValue()), 200, 1, new
OctetString("inform"),
new OctetString("v2c"),
StorageType.permanent);
so i m getting both traps and notifications for each
and every trap and also for each and every
notification. Is there a way to send only
traps/notifications at a time but need to regsiter for
both?
Thanks in advance
Vinayagam
____________________________________________________________________________________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
More information about the SNMP4J
mailing list