noc.fm.models.activeevent

Module Contents

noc.fm.models.activeevent.id_lock
class noc.fm.models.activeevent.ActiveEvent

Bases: mongoengine.document.Document

Event in the Active state

meta
status = A
timestamp
managed_object
event_class
start_timestamp
repeats
source
raw_vars
resolved_vars
vars
log
discriminator
alarms
expires
to_drop

Check event marked to be dropped

duration

Logged event duration in seconds

subject
body
managed_object_id

Hack to return managed_object.id without SQL lookup

to_dispose
__str__(self)
classmethod get_by_id(cls, event_id)
mark_as_new(self, message=None)

Move to new queue for reclassification @todo: Rename method to reclassify

mark_as_failed(self, version, traceback)

Move event into noc.events.failed

mark_as_archived(self, message)
drop(self)

Mark event to be dropped. Only for use from event trigger pyrule. All further operations on event may lead to unpredictable results. Event actually deleted by noc-classifier

log_message(self, message)
log_suppression(self, timestamp)

Increate repeat count and update timestamp, if required

get_template_vars(self)

Prepare template variables

contribute_to_alarm(self, alarm)
do_not_dispose(self)

Skip dispose :return: