Package Products :: Package ZenWin :: Module zenwin :: Class ZenWinTask
[hide private]
[frames] | no frames]

Class ZenWinTask

source code

                         object --+    
                                  |    
ZenUtils.observable.ObservableMixin --+
                                      |
                                     ZenWinTask

Instance Methods [hide private]
 
__init__(self, deviceId, taskName, scheduleIntervalSeconds, taskConfig)
Construct a new task instance to watch for Windows Event Log changes for the specified device.
source code
 
_reset(self)
Reset the WMI client and notification query watcher connection to the device, if they are presently active.
source code
 
_finished(self, result)
Callback activated when the task is complete so that final statistics on the collection can be displayed.
source code
 
_failure(self, result)
Errback for an unsuccessful asynchronous connection or collection request.
source code
 
_sendWinServiceEvent(self, name, summary, severity) source code
 
_handleResult(self, name, state, startMode)
Handle a result from the wmi query.
source code
 
_collectSuccessful(self, results)
Callback for a successful fetch of services from the remote device.
source code
 
_deviceUp(self, result) source code
 
_collectCallback(self, result)
Callback called after a connect or previous collection so that another collection can take place.
source code
 
_connectCallback(self, result)
Callback called after a successful connect to the remote Windows device.
source code
 
_connectWatcher(self, result) source code
 
_initialQuery(self, result) source code
 
_connect(self)
Called when a connection needs to be created to the remote Windows device.
source code
 
cleanup(self) source code
 
doTask(self) source code

Inherited from ZenUtils.observable.ObservableMixin: __setattr__, attachAttributeObserver, detachAttributeObserver, notifyAttributeChange

Class Variables [hide private]
  STATE_WMIC_CONNECT = 'WMIC_CONNECT'
  STATE_WMIC_QUERY = 'WMIC_QUERY'
  STATE_WMIC_PROCESS = 'WMIC_PROCESS'
  STATE_WATCHER_CONNECT = 'WATCHER_CONNECT'
  STATE_WATCHER_QUERY = 'WATCHER_QUERY'
  STATE_WATCHER_PROCESS = 'WATCHER_PROCESS'
  RUNNING = "running"
  STOPPED = "stopped"
Method Details [hide private]

__init__(self, deviceId, taskName, scheduleIntervalSeconds, taskConfig)
(Constructor)

source code 

Construct a new task instance to watch for Windows Event Log changes for the specified device.

Parameters:
  • deviceId (string) - the Zenoss deviceId to watch
  • taskName (string) - the unique identifier for this task
  • scheduleIntervalSeconds (int) - the interval at which this task will be collected
  • taskConfig - the configuration for this task
Overrides: ZenUtils.observable.ObservableMixin.__init__

_handleResult(self, name, state, startMode)

source code 

Handle a result from the wmi query. Results from both the initial WMI client query and the watcher's notification query are processed by this method. Log running and stopped transitions. Send an event if the service is monitored.