org.opennms.netmgt.archive
Class EventsArchiver

java.lang.Object
  extended by org.opennms.netmgt.archive.EventsArchiver

public class EventsArchiver
extends Object

 
  The EventsArchiver is responsible for archiving and removing events
  from the 'events' table. 
 
  The archival/deletion depends on the 'eventLog' and the 'eventDisplay'
  values for the event -
 
  If the 'eventLog == N and the eventDisplay == N',
  the event is simply deleted from the events table
 
  If the 'eventLog == N and the eventDisplay == Y',
  the event is deleted ONLY if the event has been acknowledged
 
  If the 'eventLog == Y and the eventDisplay == N',
  the event is sent to the archive file and deleted from the table
 
  If the 'eventLog == Y and the eventDisplay == Y',
  the event is sent to the archive file and deleted from the table
  ONLY if the event has been acknowledged
 
  An event is considered acknowledged if the 'eventAckUser' column has
  a non-null value
 
  An EventsArchiver run depends on attributes in the events archiver
  configuration file. The following are the properties that govern a run -
 
  - archiveAge
    This determines which events are to be removed - i.e events older
    than current time minus this time are removed
 
  - separator
    This is the separator used in between event table column values when an
    event is written to the archive file
 
  The EventsArchiver uses Apache's log4j both for its output logs and for
  the actual archiving itself - the set up for the log4j appenders for
  this archiver are all doneexclusively in the 'events.archiver.properties'
  property file
 
  A RollingFileAppender is used
  for the archive file with the defaults for this being to roll when the
  size is 100KB with the number of backups set to 4.

Author:
<A HREF="mailto:sowmya@opennms.org">Sowmya Nataraj</A>, <A HREF="http://www.opennms.org">OpenNMS</A>

Constructor Summary
EventsArchiver()
          The events archiver constructor - reads required properties, initializes the database connection and the prepared statements to select and delete events
 
Method Summary
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventsArchiver

public EventsArchiver()
               throws ArchiverException
The events archiver constructor - reads required properties, initializes the database connection and the prepared statements to select and delete events

Throws:
ArchiverException
Method Detail

main

public static void main(String[] args)


Copyright © 2009. All Rights Reserved.