Hi at all, i would like configure OpenNMS to forward all received SNMP-Traps to another OpenNMS-Instance. I have found a description on
http://blogs.opennms.org/?p=30 After configuration i got some errors in log (opennms/daemon/scriptd.log). It use OpenNMS 1.7.0 from svn. Below my configuration and the log-output. Thanks in advance Ronny <!-- scriptd-configuration.xml --> <event-script language="beanshell"> event = bsf.lookupBean("event"); if (event.snmp != null) { log.debug("forwarding a trap"); snmpTrapHelper.forwardTrap(event, "<my-trap-destination>", 162); } </event-script> <!-- Output Logfile --> Debug-Log: scriptd.log ====================== 2008-04-03 16:21:08,676 INFO [Scriptd:BroadcastEventProcessor] EventIpcManagerDefaultImpl$ListenerThread: run: calling onEvent on Scriptd:BroadcastEventProcessor for event uei.opennms.org/generic/traps/SNMP_Cold_Start dbid 595 with time Thursday, April 3, 2008 2:21:08 PM GMT 2008-04-03 16:21:08,676 DEBUG [Scriptd:BroadcastEventProcessor] BroadcastEventProcessor: Added event 'uei.opennms.org/generic/traps/SNMP_Cold_Start' to scriptd execution queue. 2008-04-03 16:21:08,676 DEBUG [Scriptd-Executor] Executor: Executing scripts for: uei.opennms.org/generic/traps/SNMP_Cold_Start 2008-04-03 16:21:08,694 ERROR [Scriptd-Executor] Executor: Non-UEI-specific event handler script [0] execution failed com.ibm.bsf.BSFException: BeanShell script error: Sourced file: <Inline eval of: event = bsf.lookupBean("event"); if (event.snmp != null) { snmpTrapHelper.forwardTrap(event, "<my-trap-destination-ip>, 162); } ; > : Attempt to invoke method: forwardTrap() on undefined variable or class name: snmpTrapHelper : at Line: 4 : in file: <Inline eval of: event = bsf.lookupBean("event"); if (event.snmp != null) { snmpTrapHelper.forwardTrap(event, "172.20.170.5", 162); } ; > : if ( event .snmp != null ) { BSF info: at line: 0 column: columnNo at bsh.util.BeanShellBSFEngine.eval(Unknown Source) at bsh.util.BeanShellBSFEngine.exec(Unknown Source) at com.ibm.bsf.BSFManager.exec(Unknown Source) at org.opennms.netmgt.scriptd.Executor.run(Executor.java:302) at java.lang.Thread.run(Thread.java:619) 2008-04-03 16:21:08,695 DEBUG [Scriptd-Executor] Executor: Finished executing scripts for: uei.opennms.org/generic/traps/SNMP_Cold_Start <!-- END --> -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-devel