Package ZenModel :: Module PerformanceConf :: Class PerformanceConf
[hide private]
[frames] | no frames]

Class PerformanceConf

source code

                                                   object --+            
                                                            |            
                                    ZenModelBase.ZenModelBase --+        
                                                                |        
Products.ZenRelations.RelationshipManager.RelationshipManager --+        
                                                                |        
                                      ExtensionClass.Base --+   |        
                                                            |   |        
                                       OFS.History.Historical --+        
                                                                |        
                                                   object --+   |        
                                                            |   |        
                                          ZenPacker.ZenPacker --+        
                                                                |        
                                            ZenModelRM.ZenModelRM --+    
                                                                    |    
                              DeviceManagerBase.DeviceManagerBase --+    
                                                                    |    
                                                       object --+   |    
                                                                |   |    
                                                  RRDView.RRDView --+    
                                                                    |    
                                                      Monitor.Monitor --+
                                                                        |
                                              StatusColor.StatusColor --+
                                                                        |
                                                                       PerformanceConf

Configuration for Performance servers

Instance Methods [hide private]
string
getDefaultRRDCreateCommand(self)
Get the default RRD Create Command, as a string.
source code
device object
findDevice(self, deviceName)
Return the object given the name
source code
Network object
getNetworkRoot(self)
Get the root of the Network object in the DMD
source code
string
buildGraphUrlFromCommands(self, gopts, drange)
Return an URL for the given graph options and date range
source code
string
performanceGraphUrl(self, context, targetpath, targettype, view, drange)
Set the full path of the target and send to view
source code
string
performanceMGraphUrl(self, context, targetsmap, view, drange)
Set the full paths for all targts in map and send to view
source code
string
renderCustomUrl(self, gopts, drange)
Return the URL for a list of custom gopts for a graph
source code
string
performanceCustomSummary(self, gopts)
Fill out full path for custom gopts and call to server
source code
list
fetchValues(self, paths, cf, resolution, start, end="")
Return values
source code
list
currentValues(self, paths)
Fill out full path and call to server
source code
string
_fullPerformancePath(self, gopts)
Add full path to a list of custom graph options
source code
list
performanceDeviceList(self, force=True)
Return a list of URLs that point to our managed devices
source code
string
performanceDataSources(self)
Return a string that has all the definitions for the performance DS's.
source code
 
deleteRRDFiles(self, device, datasource=None, datapoint=None)
Remove RRD performance data files
source code
 
setPerformanceMonitor(self, performanceMonitor=None, deviceNames=None, REQUEST=None)
Provide a method to set performance monitor from any organizer
source code
list
getPingDevices(self)
Return devices associated with this monitor configuration.
source code
 
_executeZenDiscCommand(self, deviceName, devicePath="/Discovered", performanceMonitor="localhost", discoverProto="snmp", zSnmpPort=161, zSnmpCommunity="", REQUEST=None)
Execute zendisc on the new device and return result
source code
string
executeCollectorCommand(self, command, args, REQUEST=None)
Executes the collector based daemon command.
source code
 
collectDevice(self, device=None, setlog=True, REQUEST=None, generateEvents=False)
Collect the configuration of this device AKA Model Device
source code
string
_executeZenModelerCommand(self, zenmodelerOpts, REQUEST=None)
Execute zenmodeler and return result
source code

Inherited from Monitor.Monitor: breadCrumbs, device, deviceMoveTargets, getDeviceMoveTarget, getGraphDefUrl, getOrganizerName, getRRDContextData, rrdPath, snmpIgnore

Inherited from ZenModelRM.ZenModelRM: __init__, changePythonClass, creator, editableDeviceList, findChild, getCreatedTimeString, getDmdKey, getModificationTimeString, getSubObjects, getTreeItems, getZenRootNode, index_object, primarySortKey, reindex_all, rename, unindex_object, viewName, zmanage_addProperty, zmanage_delObjects, zmanage_delProperties, zmanage_editProperties, zmanage_exportObject, zmanage_importObject, zmanage_importObjects

Inherited from ZenModelBase.ZenModelBase: __call__, __hash__, all_meta_types, aqBaseHasAttr, callZenScreen, checkRemotePerm, checkValidId, createHierarchyObj, custPropertyIds, custPropertyMap, getBreadCrumbUrlPath, getDmd, getDmdObj, getDmdRoot, getHierarchyObj, getIconPath, getIdLink, getNowString, getObjByPath, getPrimaryDmdId, getUnusedId, getZ, getZopeObj, helpLink, isLocalName, manage_deleteObjects, prepId, saveCustProperties, todayDate, urlLink, view, visibleCustPropertyMap, yesterdayDate, zenScreenUrl, zenpathjoin, zenpathsplit, zentinelTabs

Inherited from OFS.History.Historical: manage_afterHistoryCopy, manage_beforeHistoryCopy, manage_change_history, manage_historicalComparison, manage_historyCompare, manage_historyCopy

Inherited from ZenPacker.ZenPacker: addToZenPack, eligiblePacks, findObject

Inherited from DeviceManagerBase.DeviceManagerBase: getDevices, removeDevices

Inherited from RRDView.RRDView: cacheRRDValue, fetchRRDValue, fetchRRDValues, fullRRDPath, getDefaultGraphDefs, getGraphDef, getRRDDataPoint, getRRDDataPoints, getRRDFileName, getRRDNames, getRRDPaths, getRRDSum, getRRDTemplate, getRRDTemplateByName, getRRDTemplateName, getRRDTemplates, getRRDValue, getRRDValues, getThresholdInstances, getThresholds, makeLocalRRDTemplate, removeLocalRRDTemplate

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Inherited from StatusColor.StatusColor: devStatusColor, pingColor, snmpColor

Class Variables [hide private]
  meta_type = 'PerformanceConf'
  portal_type = 'PerformanceConf'
  monitorRootName = 'Performance'
  security = ClassSecurityInfo()
  eventlogCycleInterval = 60
  perfsnmpCycleInterval = 300
  processCycleInterval = 180
  statusCycleInterval = 60
  winCycleInterval = 60
  winmodelerCycleInterval = 60
  wmiqueryTimeout = 100
  configCycleInterval = 6* 60
  zenProcessParallelJobs = 10
  pingTimeOut = 1.5
  pingTries = 2
  pingChunk = 75
  pingCycleInterval = 60
  maxPingFailures = 1440
  modelerCycleInterval = 720
  renderurl = '/zport/RenderServer'
  renderuser = ''
  renderpass = ''
  discoveryNetworks = ()
  defaultRRDCreateCommand = 'RRA:AVERAGE:0.5:1:600', 'RRA:AVERAG...
  _properties = {'id': 'eventlogCycleInterval', 'type': 'int', '...
  _relations = Monitor._relations+(("devices", ToMany(ToOne, "Pr...
  factory_type_information = {'immediate_view': 'viewPerformance...

Inherited from ZenModelRM.ZenModelRM: default_catalog, isInTree

Inherited from ZenModelBase.ZenModelBase: index_html, sub_meta_types

Inherited from OFS.History.Historical: HistoricalRevisions, __ac_permissions__, manage_change_history_page, manage_options

Inherited from OFS.History.Historical (private): _manage_historyComparePage

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getDefaultRRDCreateCommand(self)

source code 
Get the default RRD Create Command, as a string. For example: '''RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:600 RRA:AVERAGE:0.5:24:600 RRA:AVERAGE:0.5:288:600 RRA:MAX:0.5:288:600'''
Returns: string
RRD create command

findDevice(self, deviceName)

source code 
Return the object given the name
Parameters:
  • deviceName (string) - Name of a device
Returns: device object
device corresponding to the name, or None

getNetworkRoot(self)

source code 
Get the root of the Network object in the DMD
Returns: Network object
base DMD Network object

buildGraphUrlFromCommands(self, gopts, drange)

source code 
Return an URL for the given graph options and date range
Parameters:
  • gopts (string) - graph options
  • drange (string) - time range to use
Returns: string
URL to a graphic

performanceGraphUrl(self, context, targetpath, targettype, view, drange)

source code 
Set the full path of the target and send to view
Parameters:
  • context (Zope context object) - Where you are in the Zope acquisition path
  • targetpath (string) - device path of performance metric
  • targettype (string) - unused
  • view (Zope object) - view object
  • drange (string) - date range
Returns: string
URL to graph

performanceMGraphUrl(self, context, targetsmap, view, drange)

source code 
Set the full paths for all targts in map and send to view
Parameters:
  • context (Zope context object) - Where you are in the Zope acquisition path
  • targetsmap (list) - list of (target, targettype) tuples
  • view (Zope object) - view object
  • drange (string) - date range
Returns: string
URL to graph

renderCustomUrl(self, gopts, drange)

source code 
Return the URL for a list of custom gopts for a graph
Parameters:
  • gopts (string) - graph options
  • drange (string) - date range
Returns: string
URL to graph

performanceCustomSummary(self, gopts)

source code 
Fill out full path for custom gopts and call to server
Parameters:
  • gopts (string) - graph options
Returns: string
URL

fetchValues(self, paths, cf, resolution, start, end="")

source code 
Return values
Parameters:
  • paths (list) - paths to performance metrics
  • cf (string) - RRD CF
  • resolution (string) - resolution
  • start (string) - start time
  • end (string) - end time
Returns: list
values

currentValues(self, paths)

source code 
Fill out full path and call to server
Parameters:
  • paths (list) - paths to performance metrics
Returns: list
values

_fullPerformancePath(self, gopts)

source code 
Add full path to a list of custom graph options
Parameters:
  • gopts (string) - graph options
Returns: string
full path + graph options

performanceDeviceList(self, force=True)

source code 
Return a list of URLs that point to our managed devices
Parameters:
  • force (boolean) - unused
Returns: list
list of device objects

performanceDataSources(self)

source code 
Return a string that has all the definitions for the performance DS's.
Returns: string
list of Data Sources

deleteRRDFiles(self, device, datasource=None, datapoint=None)

source code 
Remove RRD performance data files
Parameters:
  • device (string) - Name of a device or entry in DMD
  • datasource (string) - datasource name
  • datapoint (string) - datapoint name

setPerformanceMonitor(self, performanceMonitor=None, deviceNames=None, REQUEST=None)

source code 
Provide a method to set performance monitor from any organizer
Parameters:
  • performanceMonitor (DMD object) - DMD object that collects from a device
  • deviceNames (list) - list of device names
  • REQUEST (Zope REQUEST object) - Zope REQUEST object
Overrides: Monitor.Monitor.setPerformanceMonitor

getPingDevices(self)

source code 
Return devices associated with this monitor configuration.
Returns: list
list of devices for this monitor

_executeZenDiscCommand(self, deviceName, devicePath="/Discovered", performanceMonitor="localhost", discoverProto="snmp", zSnmpPort=161, zSnmpCommunity="", REQUEST=None)

source code 
Execute zendisc on the new device and return result
Parameters:
  • deviceName (string) - Name of a device
  • devicePath (string) - DMD path to create the new device in
  • performanceMonitor (DMD object) - DMD object that collects from a device
  • discoverProto (string) - auto or none
  • zSnmpPort (string) - zSnmpPort
  • zSnmpCommunity (string) - SNMP community string
  • REQUEST (Zope REQUEST object) - Zope REQUEST object

executeCollectorCommand(self, command, args, REQUEST=None)

source code 
Executes the collector based daemon command.
Parameters:
  • command (string) - the collector daemon to run, should not include path
  • args (list of strings) - list of arguments for the command
  • REQUEST (Zope REQUEST object) - Zope REQUEST object
Returns: string
result of the command

collectDevice(self, device=None, setlog=True, REQUEST=None, generateEvents=False)

source code 
Collect the configuration of this device AKA Model Device
Parameters:
  • device (string) - Name of a device or entry in DMD
  • setlog (boolean) - If true, set up the output log of this process
  • REQUEST (Zope REQUEST object) - Zope REQUEST object
  • generateEvents (string) - unused

Permission: ZEN_MANAGE_DEVICE

_executeZenModelerCommand(self, zenmodelerOpts, REQUEST=None)

source code 
Execute zenmodeler and return result
Parameters:
  • zenmodelerOpts (string) - zenmodeler command-line options
  • REQUEST (Zope REQUEST object) - Zope REQUEST object
Returns: string
results of command

Class Variable Details [hide private]

defaultRRDCreateCommand

Value:
'RRA:AVERAGE:0.5:1:600', 'RRA:AVERAGE:0.5:6:600', 'RRA:AVERAGE:0.5:24:\
600', 'RRA:AVERAGE:0.5:288:600', 'RRA:MAX:0.5:6:600', 'RRA:MAX:0.5:24:\
600', 'RRA:MAX:0.5:288:600',

_properties

Value:
{'id': 'eventlogCycleInterval', 'type': 'int', 'mode': 'w'}, {'id': 'p\
erfsnmpCycleInterval', 'type': 'int', 'mode': 'w'}, {'id': 'processCyc\
leInterval', 'type': 'int', 'mode': 'w'}, {'id': 'statusCycleInterval'\
, 'type': 'int', 'mode': 'w'}, {'id': 'winCycleInterval', 'type': 'int\
', 'mode': 'w'}, {'id': 'winmodelerCycleInterval', 'type': 'int', 'mod\
e': 'w'}, {'id': 'wmiqueryTimeout', 'type': 'int', 'mode': 'w', 'descr\
iption': "Number of milliseconds to wait for WMI query to respond",}, \
{'id': 'configCycleInterval', 'type': 'int', 'mode': 'w'}, {'id': 'ren\
...

_relations

Value:
Monitor._relations+(("devices", ToMany(ToOne, "Products.ZenModel.Devic\
e", "perfServer")),)

factory_type_information

Value:
{'immediate_view': 'viewPerformanceConfOverview', 'actions':({'id': 'o\
verview', 'name': 'Overview', 'action': 'viewPerformanceConfOverview',\
 'permissions':(permissions.view,)}, {'id': 'edit', 'name': 'Edit', 'a\
ction': 'editPerformanceConf', 'permissions':("Manage DMD",)}, {'id': \
'performance', 'name': 'Performance', 'action': 'viewDaemonPerformance\
', 'permissions':(permissions.view,)}, {'id': 'viewHistory', 'name': '\
Modifications', 'action': 'viewHistory', 'permissions':(ZEN_VIEW_MODIF\
ICATIONS,)},)},