Package ZenEvents :: Module zentrap :: Class ZenTrap
[show private | hide private]
[frames | no frames]

Class ZenTrap

             CmdBase --+            
                       |            
               ZenDaemon --+        
                           |        
                    ZCmdBase --+    
                               |    
                     EventServer --+
                                   |
AbstractDatagramProtocol --+       |
                           |       |
            DatagramProtocol --+   |
                               |   |
                    SNMPProtocol --+
                                   |
                                  ZenTrap


Listen for SNMP traps and turn them into events
Method Summary
  __init__(self)
  buildOptions(self)
basic options setup sub classes can add more options here
  doHandleRequest(self, data, addr, ts)
  handleTrap(self, data, addr)
Traps are processed asynchronously in a thread
  informResponse(self, data, addr)
  oid2name(self, oid)
get oids, even if we're handed slightly wrong values
  _findDevice(self, addr)
Find a device by its IP address
  _oid2name(self, oid)
short hand to get names from oids
Inherited from EventServer: finish, heartbeat, main, report, reportCycle, run, sendEvent, sendEvents, sigTerm, useTcpFileDescriptor, useUdpFileDescriptor, _wakeUpReactorAndHandleSignals
Inherited from ZCmdBase: closeAll, closedb, findDevice, getConnection, getContext, getDataRoot, getDmdObj, login, logout, opendb, syncdb, zeoConnect
Inherited from ZenDaemon: becomeDaemon, changeUser, setupLogging
Inherited from CmdBase: buildParser, parseOptions
Inherited from SNMPProtocol: datagramReceived, decode, getRequestKey, send
Inherited from DatagramProtocol: connectionRefused
Inherited from AbstractDatagramProtocol: __getstate__, doStart, doStop, makeConnection, startProtocol, stopProtocol

Class Variable Summary
float maxTime = 0.0                                                                   
str name = 'zentrap'
int totalEvents = 0                                                                     
float totalTime = 0.0                                                                   
Inherited from ZenDaemon: pidfile
Inherited from CmdBase: doesLogging
Inherited from AbstractDatagramProtocol: noisy, numPorts, transport

Method Details

buildOptions(self)

basic options setup sub classes can add more options here
Overrides:
ZenEvents.EventServer.EventServer.buildOptions (inherited documentation)

handleTrap(self, data, addr)

Traps are processed asynchronously in a thread
Overrides:
twistedsnmp.snmpprotocol.SNMPProtocol.handleTrap

oid2name(self, oid)

get oids, even if we're handed slightly wrong values

_findDevice(self, addr)

Find a device by its IP address

_oid2name(self, oid)

short hand to get names from oids

Class Variable Details

maxTime

Type:
float
Value:
0.0                                                                   

name

Type:
str
Value:
'zentrap'                                                              

totalEvents

Type:
int
Value:
0                                                                     

totalTime

Type:
float
Value:
0.0                                                                   

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