Package DataCollector :: Package plugins :: Module CollectorPlugin :: Class SnmpPlugin
[show private | hide private]
[frames | no frames]

Class SnmpPlugin

CollectorPlugin --+
                  |
                 SnmpPlugin


An SnmpPlugin defines a mapping from snmp mib values to a datamap. A valid SnmpPlugin must define collectoids a list of oids to be collected and the process method which converts the oid data to a datamap. It can override the condition method if nessesary.
Method Summary
  asdate(self, val)
Convert a byte string to the date string 'YYYY/MM/DD HH:MM:SS'
  asip(self, val)
Convert a byte string to an ip address string.
  asmac(self, val)
Convert a byte string to a mac address string.
  condition(self, device, log)
Default snmp condition is true but it can be overridden.
  preprocess(self, results, log)
Perform any plugin house keeping before calling user func process.
Inherited from CollectorPlugin: checkColumns, hexToBits, maskToBits, name, objectMap, prepId, process, relMap

Class Variable Summary
list conditionOids = []
NoneType snmpGetMap = None                                                                  
list snmpGetTableMaps = []
str transport = 'snmp'
Inherited from CollectorPlugin: classname, compname, maptype, modname, order, relname

Method Details

asdate(self, val)

Convert a byte string to the date string 'YYYY/MM/DD HH:MM:SS'

asip(self, val)

Convert a byte string to an ip address string.

asmac(self, val)

Convert a byte string to a mac address string.

condition(self, device, log)

Default snmp condition is true but it can be overridden. Default test is to check for condition oids.
Overrides:
DataCollector.plugins.CollectorPlugin.CollectorPlugin.condition

preprocess(self, results, log)

Perform any plugin house keeping before calling user func process.
Overrides:
DataCollector.plugins.CollectorPlugin.CollectorPlugin.preprocess (inherited documentation)

Class Variable Details

conditionOids

Type:
list
Value:
[]                                                                     

snmpGetMap

Type:
NoneType
Value:
None                                                                  

snmpGetTableMaps

Type:
list
Value:
[]                                                                     

transport

Type:
str
Value:
'snmp'                                                                 

Generated by Epydoc 2.1 on Thu Aug 16 09:55:14 2007 http://epydoc.sf.net