noc.fm.models.activealarm

Module Contents

class noc.fm.models.activealarm.ActiveAlarm

Bases: mongoengine.document.Document

meta
status = A
timestamp
last_update
managed_object
alarm_class
severity
vars
discriminator
log
ack_ts
ack_user
opening_event
closing_event
subscribers
custom_subject
custom_style
reopens
root
escalation_ts
escalation_tt
escalation_error
escalation_ctx
close_tt
wait_tt
wait_ts
direct_services
direct_subscribers
total_objects
total_services
total_subscribers
clear_template
clear_notification_group
adm_path
segment_path
container_path
rca_neighbors
subject
body
duration
display_duration
effective_style
set_root
__str__(self)
iter_changed_datastream(self, changed_fields=None)
clean(self)
safe_save(self, **kwargs)

Create new alarm or update existing if still exists :param kwargs: :return:

change_severity(self, user='', delta=None, severity=None, to_save=True)

Change alarm severity

log_message(self, message, to_save=True, bulk=None)
clear_alarm(self, message, ts=None, force=False)

Clear alarm :param message: Log clearing message :param ts: Clearing timestamp :param force: Clear ever if wait_tt seg

get_template_vars(self)

Prepare template variables

subscribe(self, user)

Change alarm’s subscribers

unsubscribe(self, user)
is_subscribed(self, user)
acknowledge(self, user)
unacknowledge(self, user)
get_root(self)

Get top-level root alarm

update_summary(self)

Recalculate all summaries for given alarm. Performs recursive descent :return:

_get_path_summary_bulk(self)
set_root_plain(self, root_alarm)

Set root cause

set_root_rca_cache(self, root_alarm)

Set root cause

escalate(self, tt_id, close_tt=False, wait_tt=None)
set_escalation_error(self, error)
set_escalation_context(self)
set_clear_notification(self, notification_group, template)
iter_consequences(self)

Generator yielding all consequences alarm

iter_affected(self)

Generator yielding all affected managed objects

iter_escalated(self)

Generator yielding all escalated consequences