On May 6, 2008, at 2:46 AM, Adrian Overbury wrote: > I've got a job I need OpenNMS to run on a regular basis -- say, once > every ten minutes or so. It will collect mail from an inbox via pop3, > and dump the entire headers (plus any decoded text/plain MIME body > parts) into a queue for an administrator to come along and process > later > on.
Knowing only what you've said above, I would question whether this job is really suited to OpenNMS. How does it tie into the management of your networks or systems? > When it does this, I'd like it to fire off an event (a very, very > low priority event, but still escalatable) to let the Administrators > know that there's mail waiting to be processed. Events do not have an intrinsic priority (only a severity) and cannot be escalated. Alarms can be escalated, though, and alarms begin life as events. > So, my questions are, given a class + methods that perform the > grabbing > of mail and queuing and so on, how do I (can I) schedule the job to be > run at a given interval, and how do I create my own type of event and > fire it off when new mail comes in? Unless there's a compelling reason to have OpenNMS perform the mail fetching for you, it's probably going to be much simpler to use an external utility to do that part, spawning it periodically from a cron- like scheduler. External programs can create OpenNMS events by sending XML event definitions to the Eventd listener, or by executing OPENNMS_HOME/bin/send-event.pl (which does the same thing). You would need to define the event ahead of time in OpenNMS; see http://www.opennms.org/index.php/Event_Configuration_How-To for details. -jeff ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ 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