[SNMP4J] How to send notifications and traps

Frank Fock fock at agentpp.com
Thu Aug 2 08:32:17 CEST 2007


Hi,

As I wrote, use notification filtering to filter the rows in
the notification table by notification ID or the included
variable bindings. So the problem is your configuration,
not the agent.

Best regards,
Frank

Vinayagam Natarajan wrote:
> Hi,
>
> I want to send v2 notification for some scenarios and
> v1 traps for some other scenarios for the same
> destination IP. 
> For that I am registering trap and inform in
> SNMPNOTIFICATIONMIB and the ipaddresses in
> SNMPTARGETMIB. 
> If I need to send a trap, i am basically calling
> NotificationOriginatorImpl notify method which
> bascially gets each and every row of
> SNMPNOTIFICATIONMIB and tries to get the mapped
> address from the SNMPTARGETMIB and send it.
> SNMPTARGETMIB contains one row for trap and one for
> inform. 
> So if I call notify to send trap/notification, it use
> to send both with the same VBs.
>
> Is it a problem with the way I am registering or with
> the SNMP4J agent itself
>
> Thanks in advance
> Vinayagam
>
> --- Frank Fock <fock at agentpp.com> wrote:
>
>   
>> 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
>>>   
>>>       
>>
>>     
>
>
>
>        
> ____________________________________________________________________________________
> Pinpoint customers who are looking for what you sell. 
> http://searchmarketing.yahoo.com/
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
>   





More information about the SNMP4J mailing list