[AGENT++] Same trap sent multiple times to notification target
Adluru, Krishna-p6018c (Perm Res)
Krishna.Adluru at gdc4s.com
Fri Jul 2 00:35:41 CEST 2010
Never mind. I figured it out.
Thanks,
Krishna V
-----Original Message-----
From: Adluru, Krishna-p6018c (Perm Res)
Sent: Wednesday, June 30, 2010 9:59 PM
To: agentpp at agentpp.org
Subject: Same trap sent multiple times to notification target
Hi,
In our 'setup' we have 3 notification targets, but, we need to send
each trap only once per notification target. This code is sending same
trap 3 times per target within few milliseconds. Does anyone see any
issues in the following code ? Can someone help ?
private static final int RETRIES = 1;
private static final int TIMEOUT = 200;
/** IP addresses to send NMS notifications to */
protected static String [] m_notifyAddresses = new String[3];
protected void addNotificationTargets(SnmpTargetMIB targetMIB,
SnmpNotificationMIB notificationMIB)
{
for (int i = 0; i < m_notifyAddresses.length; i++)
{
targetMIB.addDefaultTDomains();
targetMIB.addTargetAddress(new
OctetString(m_notifyAddresses[i]),
TransportDomains.transportDomainUdpIpv4, new
OctetString(
new
UdpAddress(m_notifyAddresses[i]).getValue()), TIMEOUT,
RETRIES, new OctetString("notify"), new
OctetString("v2c"),
StorageType.permanent);
targetMIB.addTargetParams(new OctetString("v2c"),
MessageProcessingModel.MPv2c,
SecurityModel.SECURITY_MODEL_SNMPv2c, new
OctetString("public"),
SecurityLevel.NOAUTH_NOPRIV, StorageType.permanent);
notificationMIB.addNotifyEntry(new
OctetString(m_notifyAddresses[i]),
new OctetString("notify"),
SnmpNotificationMIB.SnmpNotifyTypeEnum.trap,
StorageType.permanent);
}
}
Thank you.
Regards,
Krishna V
More information about the AGENTPP
mailing list