[SNMP4J] Sending Traps using snmp4j-agent library

Frank Fock fock at agentpp.com
Fri Jul 17 21:28:45 CEST 2009


Hi Pidarp,

The TestAgent is capable of sending out traps
(it actually does with its default config).
If you cannot see the trap with your sniffer
then
(a) you are sniffing on the wrong interface
(b) your OS does not support sniffing on the
interface the agent uses
(c) your agent configuration has an error

Best regards,
Frank

pradip de wrote:
> Hi,
> I was using the sample TestAgent.java to implement an snmp agent. I have
> configured my notification target address using the addNotificationTarget()
> and was using the notificationOriginator.notify() to send out a trap. In
> other words, the only change I made to TestAgent was the target IPaddress.
> However, when I try to sniff(using wireshark) for any snmp packets emanating
> out of "any" interface I dont see one. So, my question is, if I use
> TestAgent, do I have to implement my own trapSender code or does the
> notify() method do it for me. I tried looking into the source(e.g.,
> NotifyTask) along the notify() method chain, but didnt find any place where
> a PDU was getting formed and sent out. I am basically confused about whether
> the testAgent code is able to send trap PDUs to remote targets. Any help to
> demystify whats going on and quickly able to write my agent to send traps
> would be greatly appreciated.
> thanks,
> Pidarp
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list