Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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
Beispiel #4
0
 def __init__(self):
     self.configure()
     hostname = info.hostname()
     port = self.config.getint('cattle', 'port')
     WranglerServer.__init__(self, hostname, port, 'wrangler.cattle')