def _handle_metrics(self): if self._timeout('metrics'): self.debug('Logging metrics') metrics = {} metrics['hostname'] = info.hostname() metrics['time'] = time.time() metrics['load_avg'] = info.load_avg() metrics['memory'] = info.memory() metrics['running'] = self.running_tasks.keys() update_metrics(info.hostname(), metrics)
def __init__(self, hostname=None, port=None): config = config_base() if not port: port = config.getint('cattle', 'port') if not hostname: hostname = info.hostname() WranglerClient.__init__(self, hostname, port)
def __init__(self): self.hostname = info.hostname() self.memory = info.memory() self.system = info.system() self.processor = info.processor() self.ncpus = info.ncpu() self.load_avg = info.load_avg() self.enabled = False self.awake = False
def __init__(self): self.configure() hostname = info.hostname() port = self.config.getint('cattle', 'port') WranglerServer.__init__(self, hostname, port, 'wrangler.cattle')