ZenEvents :: ActionRule :: ActionRule :: Class ActionRule
[hide private]
[frames] | no frames]

Class ActionRule

source code

   Products.ZenModel.ZenModelRM.ZenModelRM --+
                                             |
Products.ZenEvents.EventFilter.EventFilter --+
                                             |
                                            ActionRule

Rule applied to events that then executes an action on matching events.

Instance Methods [hide private]
 
breadCrumbs(self, terminator='dmd')
Return the breadcrumb links for this object add ActionRules list.
source code
 
getEventFields(self)
Return list of fields used in format.
source code
 
checkFormat(self)
Check that the format string has valid fields.
source code
 
getAddresses(self)
Return the correct addresses for the action this rule uses.
source code
 
getUser(self)
Return the user this action is for.
source code
 
getUserid(self)
Return the userid this action is for.
source code
 
manage_editActionRule(self, REQUEST=None)
Update user settings.
source code
 
manage_beforeDelete(self, item, container)
Clear state in alert_state before we are deleted.
source code
 
_clearAlertState(self)
Clear state in alert_state before we are deleted.
source code
 
sqlwhere(self)
Return sql where to select alert_state data for this event.
source code
 
nextActiveWindow(self) source code
 
nextActive(self) source code
 
nextActiveNice(self) source code
 
nextDurationNice(self) source code
 
repeatNice(self) source code
 
manage_addActionRuleWindow(self, newId, REQUEST=None)
Add a ActionRule Window to this device
source code
 
manage_deleteActionRuleWindow(self, windowIds, REQUEST=None)
Delete a ActionRule Window to this device
source code
Class Variables [hide private]
  meta_type = "ActionRule"
  where = "severity >= 4 and eventState = 0 and prodState = 1000"
  delay = 0
  repeatTime = 0
  action = "email"
  format = "[zenoss] %(device)s %(summary)s"
  body = "Device: %(device)s\n" "Component: %(component)s\n" "Se...
  sendClear = True
  clearFormat = "[zenoss] CLEAR: %(device)s %(clearOrEventSummar...
  clearBody = "Event: '%(summary)s'\n" "Cleared by: '%(clearSumm...
  enabled = False
  actionTypes = "page", "email"
  targetAddr = ""
  plainText = False
  _properties = ZenModelRM._properties+({'id': 'where', 'type': ...
  _relations = "windows", ToManyCont(ToOne, "Products.ZenEvents....
  factory_type_information = {'id': 'ActionRule', 'meta_type': '...
  security = ClassSecurityInfo()
Method Details [hide private]

breadCrumbs(self, terminator='dmd')

source code 
Return the breadcrumb links for this object add ActionRules list. [('url','id'), ...]

manage_beforeDelete(self, item, container)

source code 
Clear state in alert_state before we are deleted. Also need to unindex the actionrulewindows

Class Variable Details [hide private]

body

Value:
"Device: %(device)s\n" "Component: %(component)s\n" "Severity: %(sever\
ityString)s\n" "Time: %(firstTime)s\n" "Message:\n%(message)s\n" "<a h\
ref=\"%(eventUrl)s\">Event Detail</a>\n" "<a href=\"%(ackUrl)s\">Ackno\
wledge</a>\n" "<a href=\"%(deleteUrl)s\">Delete</a>\n" "<a href=\"%(ev\
entsUrl)s\">Device Events</a>\n"

clearFormat

Value:
"[zenoss] CLEAR: %(device)s %(clearOrEventSummary)s"

clearBody

Value:
"Event: '%(summary)s'\n" "Cleared by: '%(clearSummary)s'\n" "At: %(cle\
arFirstTime)s\n" "Device: %(device)s\n" "Component: %(component)s\n" "\
Severity: %(severityString)s\n" "Message:\n%(message)s\n"

_properties

Value:
ZenModelRM._properties+({'id': 'where', 'type': 'text', 'mode': 'w'}, \
{'id': 'format', 'type': 'text', 'mode': 'w'}, {'id': 'body', 'type': \
'text', 'mode': 'w'}, {'id': 'sendClear', 'type': 'boolean', 'mode': '\
w'}, {'id': 'clearFormat', 'type': 'text', 'mode': 'w'}, {'id': 'clear\
Body', 'type': 'text', 'mode': 'w'}, {'id': 'delay', 'type': 'int', 'm\
ode': 'w'}, {'id': 'action', 'type': 'selection', 'mode': 'w', 'select\
_variable': 'actionTypes',}, {'id': 'enabled', 'type': 'boolean', 'mod\
e': 'w'}, {'id': 'targetAddr', 'type': 'string', 'mode': 'w'}, {'id': \
...

_relations

Value:
"windows", ToManyCont(ToOne, "Products.ZenEvents.ActionRuleWindow", "a\
ctionRule"),

factory_type_information

Value:
{'id': 'ActionRule', 'meta_type': 'ActionRule', 'description': """Defi\
ne action taken against events""", 'icon': 'ActionRule.gif', 'product'\
: 'ZenEvents', 'factory': 'manage_addActionRule', 'immediate_view': 'e\
ditActionRule', 'actions':({'id': 'edit', 'name': 'Edit', 'action': 'e\
ditActionRule', 'permissions':(ZEN_CHANGE_ALERTING_RULES,)}, {'id': 'm\
essage', 'name': 'Message', 'action': 'editActionRuleMessage', 'permis\
sions':(ZEN_CHANGE_ALERTING_RULES,)}, {'id': 'schedule', 'name': 'Sche\
dule', 'action': 'editActionRuleSchedule', 'permissions':(ZEN_CHANGE_A\
...