|
__init__(self,
id,
title='',
hostname='localhost',
username='root',
password='',
database='events',
port=3306,
defaultWhere='',
defaultOrderby='',
defaultResultFields=[])
Sets up event database access and initializes the cache. |
source code
|
|
tuple
|
|
list
|
|
list
|
getEventBatchME(self,
me,
selectstatus=None,
resultFields=[],
where="",
orderby="",
severity=None,
state=2,
startdate=None,
enddate=None,
offset=0,
rows=0,
getTotalCount=False,
filter="",
goodevids=[],
badevids=[],
**kwargs)
Returns a batch of events based on criteria from checked rows on
the event console. |
source code
|
|
|
restrictedUserFilter(self,
where)
This is a hook do not delete me! |
source code
|
|
list
|
getEventList(self,
resultFields=None,
where="",
orderby="",
severity=None,
state=2,
startdate=None,
enddate=None,
offset=0,
rows=0,
getTotalCount=False,
filter="",
**kwargs)
Fetch a list of events from the database matching certain
criteria. |
source code
|
|
list
|
getEventSummaryME(self,
me,
severity=1,
state=1,
prodState=None)
Return the CSS class, number of acknowledged events, and number of
unacknowledged events, per severity, for a
ManagedEntity . |
source code
|
|
list
|
getEventSummary(self,
where="",
severity=1,
state=1,
prodState=None)
Return a list of tuples with number of events and the color of the
severity that the number represents. |
source code
|
|
|
getEventDetailFromStatusOrHistory(self,
evid=None,
dedupid=None,
better=False) |
source code
|
|
EventDetail object
|
|
|
getStatusME(self,
me,
statusclass=None,
**kwargs) |
source code
|
|
|
|
|
getOrganizerStatus(self,
org,
statusclass=None,
severity=None,
state=0,
where="")
see IEventStatus |
source code
|
|
|
getOrganizerStatusIssues(self,
event_key,
severity=4,
state=0,
where="",
limit=0)
Return list of tuples (org, count) for all organizers with
events. |
source code
|
|
|
getDevicePingIssues(self,
state=2,
limit=0)
Return devices with ping problems. |
source code
|
|
|
getWmiConnIssues(self,
state=2,
limit=0)
Return devices with WMI connection failures. |
source code
|
|
|
getDeviceStatusIssues(self,
severity=4,
state=1,
limit=0)
Return only status issues. |
source code
|
|
|
getDeviceIssues(self,
severity=1,
state=0,
where="",
mincount=0,
limit=0)
Return list of tuples (device, count, total) of events for all
devices with events. |
source code
|
|
|
getDeviceStatus(self,
device,
statclass=None,
countField=None,
severity=3,
state=None,
where="")
see IEventStatus |
source code
|
|
|
|
|
|
|
|
|
getHeartbeat(self,
failures=True,
simple=False,
limit=0,
db=None)
Return all heartbeat issues list of tuples (device, component,
secs) |
source code
|
|
|
getHeartbeatObjects(self,
failures=True,
simple=False,
limit=0,
db=None) |
source code
|
|
|
getAllComponentStatus(self,
statclass,
countField=None,
severity=3,
state=1,
where="")
Fetch the counts on all components matching statClass |
source code
|
|
|
getMaxSeverity(self,
me)
Returns the severity of the most severe event. |
source code
|
|
|
getComponentStatus(self,
device,
component,
statclass=None,
countField=None,
severity=3,
state=1,
where="")
see IEventStatus |
source code
|
|
|
getBatchComponentInfo(self,
components)
Given a list of dicts with keys 'device', 'component', make a
query to get an overall severity and device status for the group. |
source code
|
|
|
getEventOwnerListME(self,
me,
severity=0,
state=1)
Return list of event owners based on passed in managed entity. |
source code
|
|
|
|
string
|
|
object
|
|
|
|
|
|
|
|
|
|
|
sendEvents(self,
events)
Send a group of events to the backend. |
source code
|
|
|
|
|
convert(self,
field,
value)
Perform convertion of value coming from database value if
nessesary. |
source code
|
|
|
getFieldList(self)
Return a list of all fields in the status table of the
backend. |
source code
|
|
|
getEventStates(self)
Return a list of possible event states. |
source code
|
|
|
getEventActions(self)
Return a list of possible event actions. |
source code
|
|
|
getSeverities(self)
Return a list of tuples of severities [('Warning', 3), ...] |
source code
|
|
|
getSeverityString(self,
severity)
Return a string representation of the severity. |
source code
|
|
|
getPriorities(self)
Return a list of tuples of priorities [('Warning', 3), ...] |
source code
|
|
|
getPriorityString(self,
priority)
Return the priority name |
source code
|
|
|
convertEventField(self,
field,
value,
default="")
Convert numeric values commonly found in events to their textual
representation. |
source code
|
|
|
|
|
getStatusImgSrc(self,
status)
Return the img source for a status number |
source code
|
|
|
getEventCssClass(self,
severity,
acked=False)
return the css class name to be used for this event. |
source code
|
|
|
isDate(self,
colName)
Check to see if a column is of type date. |
source code
|
|
|
dateString(self,
value)
Convert a date from database format to string. |
source code
|
|
|
dateDB(self,
value)
Convert a date to its database format. |
source code
|
|
|
escape(self,
value)
Prepare string values for db by escaping special characters. |
source code
|
|
|
|
|
eventControls(self)
Are there event controls on this event list. |
source code
|
|
|
updateEvents(self,
stmt,
whereClause,
reason,
table="status",
toLog=True) |
source code
|
|
|
manage_addEvent(self,
REQUEST=None)
Create an event from user supplied data |
source code
|
|
|
|
|
manage_deleteEvents(self,
evids=(),
REQUEST=None)
Delete the given event ids |
source code
|
|
|
|
|
manage_undeleteEvents(self,
evids=(),
REQUEST=None)
Move the given event ids into status and delete from history |
source code
|
|
|
manage_deleteAllEvents(self,
devname,
REQUEST=None)
Delete the events for a given Device (used for deleting the
device |
source code
|
|
|
|
|
manage_deleteHeartbeat(self,
devname,
REQUEST=None) |
source code
|
|
|
manage_ackEvents(self,
evids=(),
REQUEST=None)
Ack the given event ids |
source code
|
|
|
manage_setEventStates(self,
eventState=None,
evids=(),
userid="",
REQUEST=None) |
source code
|
|
|
manage_createEventMap(self,
eventClass=None,
evids=(),
REQUEST=None)
Create an event map from an event or list of events. |
source code
|
|
|
manage_refreshConversions(self,
REQUEST=None)
get the conversion information from the database server |
source code
|
|
|
manage_editCache(self,
timeout=5,
clearthresh=20,
REQUEST=None)
Reset cache values |
source code
|
|
|
manage_clearCache(self,
REQUEST=None)
Reset cache values |
source code
|
|
|
manage_editEventManager(self,
REQUEST=None)
Call zmanage_editProperties then take care of saving a few values
to ZenEventHistory |
source code
|
|
|
manage_clearHeartbeats(self,
REQUEST=None)
truncate heartbeat table |
source code
|
|
|
zmanage_editProperties(self,
REQUEST=None)
Need to handle editing of history event fields differently |
source code
|
|
|
manage_addLogMessage(self,
evid=None,
message='',
REQUEST=None)
Add a log message to an event |
source code
|
|
|
|
|
|
|
installIntoPortal(self)
Install skins into portal. |
source code
|
|
Inherited from DbAccessBase.DbAccessBase :
cleanstring ,
close ,
connect
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|
|
eventStateConversions = 'New', 0, ('Acknowledged', 1), ('Suppr...
|
|
eventActions = 'status', 'history', 'drop'
|
|
severityConversions = 'Critical', 5, ('Error', 4), ('Warning',...
|
|
severities = dict([(b, a) for a, b in severityConversions])
|
|
priorityConversions = 'None',-1, ('Emergency', 0), ('Alert', 1...
|
|
priorities = dict([(b, a) for a, b in priorityConversions])
|
|
statusTable = "status"
|
|
detailTable = "detail"
|
|
logTable = "log"
|
|
lastTimeField = "lastTime"
|
|
firstTimeField = "firstTime"
|
|
deviceField = "device"
|
|
componentField = "component"
|
|
eventClassField = "eventClass"
|
|
severityField = "severity"
|
|
stateField = "eventState"
|
|
countField = "count"
|
|
prodStateField = "prodState"
|
|
DeviceGroupField = "DeviceGroups"
|
|
SystemField = "Systems"
|
|
DeviceWhere = "\"device = '%s'\" % me.getDmdKey()"
|
|
DeviceResultFields = "component", "eventClass", "summary", "fi...
|
|
ComponentWhere = "\"(device = '%s' and component = '%s')\"" " ...
|
|
ComponentResultFields = "eventClass", "summary", "firstTime", ...
|
|
IpAddressWhere = "\"ipAddress='%s'\" % (me.getId())"
|
|
EventClassWhere = "\"eventClass like '%s%%'\" % me.getDmdKey()"
|
|
EventClassInstWhere = """\"eventClass = '%s' and eventClassKey...
|
|
DeviceClassWhere = "\"DeviceClass like '%s%%'\" % me.getDmdKey()"
|
|
LocationWhere = "\"Location like '%s%%'\" % me.getDmdKey()"
|
|
SystemWhere = "\"Systems like '%%|%s%%'\" % me.getDmdKey()"
|
|
DeviceGroupWhere = "\"DeviceGroups like '%%|%s%%'\" % me.getDm...
|
|
defaultResultFields = "device", "component", "eventClass", "su...
|
|
defaultFields = 'eventState', 'severity', 'evid'
|
|
defaultEventId = 'device', 'component', 'eventClass', 'eventKe...
|
|
requiredEventFields = 'device', 'summary', 'severity'
|
|
refreshConversionsForm = DTMLFile('dtml/refreshNcoProduct', gl...
|
|
defaultAvailabilityDays = 7
|
|
defaultPriority = 3
|
|
eventAgingHours = 4
|
|
eventAgingSeverity = 4
|
|
historyMaxAgeDays = 0
|
|
_properties = {'id': 'backend', 'type': 'string', 'mode': 'r',...
|
|
_relations = "commands", ToManyCont(ToOne, "Products.ZenEvents...
|
|
factory_type_information = {'immediate_view': 'editEventManage...
|
|
security = ClassSecurityInfo()
|
Inherited from DbAccessBase.DbAccessBase (private):
_v_cpool
|