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

Class ZenTrap

source code

             Products.ZenUtils.CmdBase.CmdBase --+            
                                                 |            
             Products.ZenUtils.ZenDaemon.ZenDaemon --+        
                                                     |        
                   Products.ZenUtils.ZCmdBase.ZCmdBase --+    
                                                         |    
                                   EventServer.EventServer --+
                                                             |
twisted.internet.protocol.AbstractDatagramProtocol --+       |
                                                     |       |
            twisted.internet.protocol.DatagramProtocol --+   |
                                                         |   |
                     twistedsnmp.snmpprotocol.SNMPProtocol --+
                                                             |
                                                            ZenTrap

Listen for SNMP traps and turn them into events

Instance Methods [hide private]
 
__init__(self) source code
 
handleTrap(self, data, addr)
Traps are processed asynchronously in a thread
source code
 
_findDevice(self, addr)
Find a device by its IP address
source code
 
_oid2name(self, oid)
short hand to get names from oids
source code
 
oid2name(self, oid)
get oids, even if we're handed slightly wrong values
source code
 
doHandleRequest(self, data, addr, ts) source code
 
informResponse(self, data, addr) source code
 
buildOptions(self)
basic options setup sub classes can add more options here
source code

Inherited from EventServer.EventServer: finish, heartbeat, main, report, reportCycle, run, sendEvent, sendEvents, sigTerm, useTcpFileDescriptor, useUdpFileDescriptor

Inherited from Products.ZenUtils.ZCmdBase.ZCmdBase: closeAll, closedb, findDevice, getConnection, getContext, getDataRoot, getDmdObj, login, logout, opendb, syncdb, zeoConnect

Inherited from Products.ZenUtils.ZenDaemon.ZenDaemon: becomeDaemon, changeUser, setupLogging

Inherited from Products.ZenUtils.CmdBase.CmdBase: buildParser, generate_configs, generate_xml_table, parseOptions, pretty_print_config_comment

Inherited from twistedsnmp.snmpprotocol.SNMPProtocol: datagramReceived, decode, getRequestKey, send

Inherited from twisted.internet.protocol.DatagramProtocol: connectionRefused

Inherited from twisted.internet.protocol.AbstractDatagramProtocol: __getstate__, doStart, doStop, makeConnection, startProtocol, stopProtocol

Class Variables [hide private]
  totalTime = 0.0
  totalEvents = 0
  maxTime = 0.0
  name = 'zentrap'

Inherited from Products.ZenUtils.ZenDaemon.ZenDaemon: pidfile

Inherited from Products.ZenUtils.CmdBase.CmdBase: doesLogging

Inherited from twisted.internet.protocol.AbstractDatagramProtocol: noisy, numPorts, transport

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: EventServer.EventServer.__init__

handleTrap(self, data, addr)

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

buildOptions(self)

source code 
basic options setup sub classes can add more options here
Overrides: EventServer.EventServer.buildOptions