Package ZenRRD :: Module SnmpDaemon
[hide private]
[frames] | no frames]

Source Code for Module ZenRRD.SnmpDaemon

 1  ########################################################################### 
 2  # 
 3  # This program is part of Zenoss Core, an open source monitoring platform. 
 4  # Copyright (C) 2007, Zenoss Inc. 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify it 
 7  # under the terms of the GNU General Public License version 2 as published by 
 8  # the Free Software Foundation. 
 9  # 
10  # For complete information please visit: http://www.zenoss.com/oss/ 
11  # 
12  ########################################################################### 
13  #! /usr/bin/env python  
14   
15  __doc__='''SnmpDaemon 
16   
17  Common performance monitoring daemon code for zenperfsnmp and zenprocess. 
18   
19  $Id$ 
20  ''' 
21   
22  __version__ = "$Revision$"[11:-2] 
23   
24  from RRDDaemon import RRDDaemon 
25   
26  try: 
27      from pynetsnmp.twistedsnmp import snmpprotocol 
28  except: 
29      import warnings 
30      warnings.warn("Using python-based snmp engine") 
31      from twistedsnmp import snmpprotocol 
32   
33   
34 -class SnmpDaemon(RRDDaemon):
35 snmpCycleInterval = 5*60 # seconds 36 heartBeatTimeout = snmpCycleInterval*3 37 38 properties = RRDDaemon.properties + ('snmpCycleInterval',) 39
40 - def __init__(self, name):
41 RRDDaemon.__init__(self, name) 42 self.snmpPort = snmpprotocol.port()
43
44 - def setPropertyItems(self, items):
47