Beispiel #1
0
 def __init__(self, conf):
     self.server_name = conf.get('server_name', 'proxy-server')
     for conf_tag in ['lb_private_ips', 'service_ips']:
         setattr(self, conf_tag, return_ips(conf, conf_tag))
     self.warn_percent = float(conf.get('warn_percent', '0.8'))
     self.logger = get_logger(conf, log_route='access-processor')
     self.time_zone = common.get_time_zone(conf, self.logger, 'time_zone',
                                           str(local_zone))
Beispiel #2
0
 def __init__(self, conf):
     self.server_name = conf.get('server_name', 'proxy-server')
     for conf_tag in ['lb_private_ips', 'service_ips']:
         setattr(self, conf_tag, return_ips(conf, conf_tag))
     self.warn_percent = float(conf.get('warn_percent', '0.8'))
     self.logger = get_logger(conf, log_route='access-processor')
     self.time_zone = common.get_time_zone(conf, self.logger, 'time_zone',
                                           str(local_zone))
 def __init__(self, stats_conf, stats_type, data_dir, filename_format):
     super(DatabaseStatsCollector, self).__init__(stats_conf)
     self.stats_type = stats_type
     self.data_dir = data_dir
     self.filename_format = filename_format
     self.devices = stats_conf.get('devices', '/srv/node')
     self.mount_check = stats_conf.get('mount_check',
                                       'true').lower() in TRUE_VALUES
     self.target_dir = stats_conf.get('log_dir', '/var/log/swift')
     mkdirs(self.target_dir)
     self.logger = get_logger(stats_conf, log_route='%s-stats' % stats_type)
     self.time_zone = common.get_time_zone(stats_conf, self.logger,
                                           'time_zone', str(local_zone))
 def __init__(self, stats_conf, stats_type, data_dir, filename_format):
     super(DatabaseStatsCollector, self).__init__(stats_conf)
     self.stats_type = stats_type
     self.data_dir = data_dir
     self.filename_format = filename_format
     self.devices = stats_conf.get('devices', '/srv/node')
     self.mount_check = stats_conf.get('mount_check',
                                        'true').lower() in TRUE_VALUES
     self.target_dir = stats_conf.get('log_dir', '/var/log/swift')
     mkdirs(self.target_dir)
     self.logger = get_logger(stats_conf,
                              log_route='%s-stats' % stats_type)
     self.time_zone = common.get_time_zone(stats_conf, self.logger,
                                           'time_zone', str(local_zone))
Beispiel #5
0
 def __init__(self, conf):
     c = conf.get('log-processor')
     super(LogProcessorDaemon, self).__init__(c)
     self.total_conf = conf
     self.logger = get_logger(c, log_route='log-processor')
     self.log_processor = LogProcessor(conf, self.logger)
     self.lookback_hours = int(c.get('lookback_hours', '120'))
     self.lookback_window = int(
         c.get('lookback_window', str(self.lookback_hours)))
     self.log_processor_account = c['swift_account']
     self.log_processor_container = c.get('container_name',
                                          'log_processing_data')
     self.worker_count = int(c.get('worker_count', '1'))
     self._keylist_mapping = None
     self.processed_files_filename = 'processed_files.pickle.gz'
     self.time_zone = common.get_time_zone(c, self.logger, 'time_zone',
                                           str(local_zone))
     self.format_type = common.get_format_type(c, self.logger,
                                               'format_type', 'csv')
Beispiel #6
0
 def __init__(self, conf):
     c = conf.get('log-processor')
     super(LogProcessorDaemon, self).__init__(c)
     self.total_conf = conf
     self.logger = get_logger(c, log_route='log-processor')
     self.log_processor = LogProcessor(conf, self.logger)
     self.lookback_hours = int(c.get('lookback_hours', '120'))
     self.lookback_window = int(c.get('lookback_window',
                                str(self.lookback_hours)))
     self.log_processor_account = c['swift_account']
     self.log_processor_container = c.get('container_name',
                                          'log_processing_data')
     self.worker_count = int(c.get('worker_count', '1'))
     self._keylist_mapping = None
     self.processed_files_filename = 'processed_files.pickle.gz'
     self.time_zone = common.get_time_zone(c, self.logger, 'time_zone',
                                           str(local_zone))
     self.format_type = common.get_format_type(c, self.logger,
                                               'format_type', 'csv')