def __init__(self, config=None, handlers=[], name=None, configfile=None): super(BaseCollector, self).__init__(config, handlers, name, configfile) self.cpu_collector = CPUCollector(config=self.config, configfile=self.configfile, handlers=self.handlers) self.memory_collector = MemoryCollector(config=self.config, configfile=self.configfile, handlers=self.handlers) self.loadavg_collector = LoadAverageCollector( config=self.config, configfile=self.configfile, handlers=self.handlers) self.network_collector = NetworkCollector(config=self.config, configfile=self.configfile, handlers=self.handlers) self.diskusage_collector = DiskUsageCollector( config=self.config, configfile=self.configfile, handlers=self.handlers) self.diskspace_collector = DiskSpaceCollector( config=self.config, configfile=self.configfile, handlers=self.handlers) self.vmstat_collector = VMStatCollector(config=self.config, configfile=self.configfile, handlers=self.handlers)
def setUp(self): config = get_collector_config('LoadAverageCollector', {'interval': 10}) self.collector = LoadAverageCollector(config, None)