Package Products :: Package ZenWin :: Module zeneventlog :: Class ZenEventLogTask |
[hide private]
[frames] | no frames]

# Class ZenEventLogTask

source code

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

A scheduled task that watches the event log on a single Windows device.

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 notification query watcher connection to the device, if one is presently active. | source code
dictionary |
_makeEvent(self, lrec) Put event in the queue to be sent to the ZenEventManager. | 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
_collectSuccessful(self, result) Callback for a successful fetch of events from the remote device. | 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
_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` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__str__`

Class Variables | [hide private]
| EVENT_LOG_NOTIFICATION_QUERY = ``...``
| STATE_CONNECTING = `'CONNECTING'`
| STATE_POLLING = `'POLLING'`
| STATE_PROCESSING = `'PROCESSING'`

Properties | [hide private]
Inherited from `object`: `__class__`

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__

### _makeEvent(self, lrec) | source code
Put event in the queue to be sent to the ZenEventManager. Parameters: `lrec` (log record object) - log record Returns: dictionary dictionary with event keys and values

Class Variable Details | [hide private]

  ### EVENT_LOG_NOTIFICATION_QUERY Value:
      """
              SELECT * FROM __InstanceCreationEvent
              WHERE TargetInstance ISA 'Win32_NTLogEvent'
                AND TargetInstance.EventType <= %d
              """