Changeset 60
- Timestamp:
- 04/11/05 12:14:53 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/daemon/togad.py
r58 r60 14 14 import random 15 15 from types import * 16 import DBClass 16 17 17 18 # Specify debugging level here; … … 29 30 GMETAD_CONF = '/etc/gmetad.conf' 30 31 32 # Wether or not to maintain a archive of all ganglia node data 33 # Note: This will require a significant amount of hd space 34 # depending on your cluster size 35 # 36 ARCHIVE = 0 37 38 # Where to grab XML data from 39 # Normally: local gmetad (port 8651) 40 # 41 ARCHIVE_SOURCE = "localhost:8651" 42 43 # List of data_source names to archive for 44 # 45 ARCHIVE_DATASOURCES = [ "LISA Cluster" ] 46 31 47 # Where to store the archived rrd's 32 48 # 33 49 ARCHIVE_PATH = '/data/toga/rrds' 34 50 35 # List of data_source names to archive for36 #37 ARCHIVE_SOURCES = [ "LISA Cluster" ]38 39 51 # Amount of hours to store in one single archived .rrd 40 52 # 41 53 ARCHIVE_HOURS_PER_RRD = 12 54 55 # Wether or not to run a seperate Toga jobinfo server 56 # 57 TOGA_SERVER = 1 58 59 # On what interfaces to listen 60 # 61 TOGA_SERVER_INTERFACES = [ 'eth0' ] 62 63 # On what port to listen 64 # 65 TOGA_SERVER_PORT = 9048 66 67 # Toga's SQL dbase name to use 68 # 69 TOGA_SERVER_SQL_DBASE = "toga" 42 70 43 71 # Wether or not to run as a daemon in background … … 51 79 ###################### 52 80 81 ### 82 # You'll only want to change anything below here unless you 83 # know what you are doing (i.e. your name is Ramon Bastiaans) 84 ### 85 53 86 # What XML data types not to store 54 87 # … … 66 99 This is TOrque-GAnglia's data Daemon 67 100 """ 101 102 #class TogaServer: 103 104 #class TogaXMLHandler( ContentHandler ): 68 105 69 106 class RRDMutator: … … 152 189 clustername = item 153 190 154 if not self.clusters.has_key( clustername ) and clustername in ARCHIVE_ SOURCES:191 if not self.clusters.has_key( clustername ) and clustername in ARCHIVE_DATASOURCES: 155 192 156 193 self.clusters[ clustername ] = RRDHandler( self.config, clustername ) … … 178 215 self.time = attrs.get( 'LOCALTIME', "" ) 179 216 180 if not self.clusters.has_key( self.clusterName ) and self.clusterName in ARCHIVE_ SOURCES:217 if not self.clusters.has_key( self.clusterName ) and self.clusterName in ARCHIVE_DATASOURCES: 181 218 182 219 self.clusters[ self.clusterName ] = RRDHandler( self.config, self.clusterName ) … … 184 221 debug_msg( 10, ' |-Cluster found: %s' %( self.clusterName ) ) 185 222 186 elif name == 'HOST' and self.clusterName in ARCHIVE_ SOURCES:223 elif name == 'HOST' and self.clusterName in ARCHIVE_DATASOURCES: 187 224 188 225 self.hostName = attrs.get( 'NAME', "" ) … … 192 229 debug_msg( 10, ' | |-Host found: %s - ip %s reported %s' %( self.hostName, self.hostIp, self.hostReported ) ) 193 230 194 elif name == 'METRIC' and self.clusterName in ARCHIVE_ SOURCES:231 elif name == 'METRIC' and self.clusterName in ARCHIVE_DATASOURCES: 195 232 196 233 type = attrs.get( 'TYPE', "" ) … … 295 332 self.config = GangliaConfigParser( GMETAD_CONF ) 296 333 297 self.myXMLGatherer = GangliaXMLGatherer( 'localhost', 8651)334 self.myXMLGatherer = GangliaXMLGatherer( ARCHIVE_SOURCE.split( ':' )[0], ARCHIVE_SOURCE.split( ':' )[1] ) 298 335 self.myParser = make_parser() 299 336 self.myHandler = GangliaXMLHandler( self.config ) … … 859 896 "Program startup" 860 897 861 myProcessor = GangliaXMLProcessor() 862 863 if DAEMONIZE: 864 myProcessor.daemon() 865 else: 866 myProcessor.run() 898 if TOGA_SERVER: 899 900 myServer = TogaServer() 901 902 if DAEMONIZE: 903 myServer.daemon() 904 else: 905 myServer.run() 906 907 if ARCHIVE: 908 909 myProcessor = GangliaXMLProcessor() 910 911 if DAEMONIZE: 912 myProcessor.daemon() 913 else: 914 myProcessor.run() 867 915 868 916 def check_dir( directory ):
Note: See TracChangeset
for help on using the changeset viewer.