Package Products :: Package ZenRRD :: Module zenperfsnmp :: Class SnmpPerformanceCollectionTask
[hide private]
[frames] | no frames]

Class SnmpPerformanceCollectionTask

source code

ZenCollector.tasks.BaseTask --+
                              |
                             SnmpPerformanceCollectionTask

A task that performs periodic performance collection for devices providing data via SNMP agents.

Instance Methods [hide private]
 
__init__(self, deviceId, taskName, scheduleIntervalSeconds, taskConfig) source code
 
_failure(self, reason)
Twisted errBack to log the exception for a single device.
source code
 
_connectCallback(self, result)
Callback called after a successful connect to the remote device.
source code
 
_fetchPerf(self, ignored)
Get performance data for all the monitored components on a device
source code
 
_checkOidResults(self, results)
Decode responses from the device and sanity check the responses
source code
 
_storeOidResults(self, results)
Store the OID values in RRD files
source code
 
_finished(self, result)
Callback activated when the task is complete
source code
 
cleanup(self) source code
Twisted deferred object
doTask(self)
Contact to one device and return a deferred which gathers data from the device.
source code
Twisted deferred
_get(self, oids)
Perform SNMP get for specified OIDs
source code
 
_connect(self)
Create a connection to the remote device
source code
 
_close(self)
Close down the connection to the remote device
source code
 
_updateStatus(self, success)
Send up/down events based on SNMP results
source code
 
_badOid(self, oid)
Report any bad OIDs and then remove the OID so we don't generate any further errors.
source code
 
displayStatistics(self)
Called by the collector framework scheduler, and allows us to see how each task is doing.
source code
Class Variables [hide private]
  STATE_CONNECTING = 'CONNECTING'
  STATE_FETCH_PERF = 'FETCH_PERF_DATA'
  STATE_STORE_PERF = 'STORE_PERF_DATA'
Method Details [hide private]

__init__(self, deviceId, taskName, 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

_failure(self, reason)

source code 

Twisted errBack to log the exception for a single device.

Parameters:
  • reason (Twisted error instance) - explanation of the failure

_fetchPerf(self, ignored)

source code 

Get performance data for all the monitored components on a device

Parameters:
  • ignored (result of previous callback) - required to keep Twisted's callback chain happy

_checkOidResults(self, results)

source code 

Decode responses from the device and sanity check the responses

Parameters:
  • results (array of (boolean, dictionaries)) - results of SNMP gets

_storeOidResults(self, results)

source code 

Store the OID values in RRD files

Parameters:
  • results (array of (boolean, dictionaries)) - results of SNMP gets

_finished(self, result)

source code 

Callback activated when the task is complete

Parameters:
  • result (array of (boolean, dictionaries)) - results of SNMP gets

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 scan the OIDs on a device.

_get(self, oids)

source code 

Perform SNMP get for specified OIDs

Parameters:
  • oids (list of strings) - OIDs to gather
Returns: Twisted deferred
Twisted deferred

_updateStatus(self, success)

source code 

Send up/down events based on SNMP results

Parameters:
  • success (boolean) - Did everything work?

_badOid(self, oid)

source code 

Report any bad OIDs and then remove the OID so we don't generate any further errors.

Parameters:
  • oid (string) - the OID that is not responding