[SNMP4J] Sending Traps doesn't works
Frank Fock
fock at agentpp.com
Mon Feb 4 19:58:03 CET 2008
Hi Alessandro,
either you use a MIB browser that supports engine ID
discovery for INFORM requests or you will have to
configure the appropriate engine ID in the agent
for that target.
Best regards,
Frank
Alessandro Lattughini wrote:
> Hi,I'm trying to send custom traps notification using snmp4j-agent.I've modified the TestAgent class adding the follow code:1 - I've added a start() method where I've set the NotificationOriginator:public void start() { this.loadConfig(ImportModes.REPLACE_CREATE); this.addShutdownHook(); this.getServer().addContext(new OctetString("public")); this.finishInit(); agent.setNotificationOriginator(notificationOriginator); notificationOriginator.notify(new OctetString(""), SnmpConstants.coldStart, new VariableBinding[0]); this.sendColdStartNotification(); }2 - I've added a simple method in TestAgent to send a trap:
>
> public void sendTrap(){ agent.notify(new OctetString(), SnmpConstants.coldStart, new VariableBinding[0]); }
>
>
> 3) I've called the sendTrap() method from the main() method in TestAgent:
>
> testAgent1.start(); testAgent1.run(); testAgent1.sendTrap();
>
>
> I'm using a simple MIB browser but when I try to send the trap,
> browser doesn't receive anything.
> Watching the log of the MIB browser I have seen this error message:
>
> "Can't receive SNMPv3 inform because engineID is not provided."
>
> Can anybody help me ?
>
> _________________________________________________________________
> Ti piace giocare con le lettere? Prova ABCLive!
> http://messengergiochi.it.msn.com/_______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
More information about the SNMP4J
mailing list