Re: [opennms-devel] create a new event from a java class
"Aaron Paxson" <[email protected]>
| Newsgroups | gmane.network.opennms.bugs |
|---|---|
| Message-ID | <[email protected]> |
I had this exact same requirement. I have a java scheduler running timely tasks to search some files for specific text. If it found a text I was interested in, send a specific event. But how to send an event? Here is the (very quick and dirty) way to do it. Mind you, this code can be optimized. I did it quickly. http://www.opennms.org/index.php/Send_event_using_java On Dec 28, 2007 9:28 AM, <[email protected]> wrote: > I need to write some codes, for example, to search remote log file. Then, > if some > keys are matched, I hope it can create a new event to inform users. I do > read the > Example about how to Custom Event. like below. But what I want to know is > how to > define an event related to a Java class which will create this event at > some > times. > > <event> > <uei>uei.mycompany.net/generic/smartd/DiskLost</uei> > <event-label>Smartd Disk could not be inserted</event-label> > <descr> > An event indicating a lost disk > </descr> > <logmsg dest='logndisplay'>Smartd, disk insert failure:%id% (%id%) > args(%parm[##]%):%parm[all]%</logmsg> > <severity>Critical</severity> > <alarm-data reduction-key="%uei%:%dpname%:%nodeid%" alarm-type="1" > /> > </event> > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > 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 > -- Aaron J. Paxson --------- [email protected] http://aaron.thepaxson5.org ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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