Products :: ZenStatus :: PingTask :: PingTask :: Class PingTask |
[hide private]
[frames] | no frames]

# Class PingTask

source code

    ZenCollector.tasks.BaseTask --+
                                  |
                                 PingTask

Instance Methods | [hide private]
__init__(self, taskName, deviceId, scheduleIntervalSeconds, taskConfig) | source code
Twisted deferred object |
doTask(self) Contact to one device and return a deferred which gathers data from the device. | source code
_getPauseOnScheduled(self) | source code
_setPauseOnScheduled(self, value) | source code
scheduled(self, scheduler) After the task has been scheduled, set the task in to the PAUSED state. | source code
trace(self) | source code
isUp(self) Determine if the device is up | source code
_calculateState(self) Calculate if the device is up or down based on current ping statistics. | source code
resetPingResult(self) Clear out current ping statistics. | source code
logPingResult(self, pingResult) Log the PingResult; set ping state, log to rrd. | source code
sendPingEvent(self, msgTpl, severity, rootCause=None) Send an event based on a ping job to the event backend. | source code
sendPingUp(self, msgTpl='%s is UP!') Send an ping up event to the event backend. | source code
sendPingDown(self, msgTpl='%s is DOWN!', rootCause=None) Send an ping down event to the event backend. | source code
storeResults(self) Store the datapoint results asked for by the RRD template. | source code

Class Variables | [hide private]
| STATE_PING_START = `'PING_START'`
| STATE_PING_STOP = `'PING_STOP'`
| STATE_STORE_PERF = `'STORE_PERF_DATA'`
| pauseOnScheduled = `property(fget= _getPauseOnScheduled, fset= `...`` Pause this task after it's been scheduled.

Method Details | [hide private]

### __init__(self, taskName, deviceId, scheduleIntervalSeconds, taskConfig) (Constructor) | source code
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

### doTask(self) | source code
Contact to one device and return a deferred which gathers data from the device. Returns: Twisted deferred object A task to ping the device and any of its interfaces.

### scheduled(self, scheduler) | source code
After the task has been scheduled, set the task in to the PAUSED state. Parameters: `scheduler` (IScheduler) - Collection Framework Scheduler

### trace(self) | source code
Decorators: `@property`

### isUp(self) | source code
Determine if the device is up Decorators: `@property`

### _calculateState(self) | source code
Calculate if the device is up or down based on current ping statistics. Return None if unknown, False if down, and True if up.

Class Variable Details | [hide private]

  ### pauseOnScheduled Pause this task after it's been scheduled. Value:
      property(fget= _getPauseOnScheduled, fset= _setPauseOnScheduled)