[SNMP4J] How to send notifications and traps

Frank Fock fock at agentpp.com
Mon Jul 30 17:46:11 CEST 2007


Hi,

I have difficulties to understand your question, but may be
using the notification filtering of the SNMP-NOTIFICATION-MIB
could help you.

Best regards,
Frank

Vinayagam Natarajan wrote:
> 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
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
>   





More information about the SNMP4J mailing list