This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit 6702492fbf2c9ce6f3bd75b69060166d9820485d Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Thu Jun 25 16:17:06 2015 +0200 removed glances --- app/modules/connection_modules/glances.py | 37 --------------------------- app/modules/monitoring_modules/cpu_glances.py | 31 ---------------------- 2 files changed, 68 deletions(-) diff --git a/app/modules/connection_modules/glances.py b/app/modules/connection_modules/glances.py deleted file mode 100644 index 03def10..0000000 --- a/app/modules/connection_modules/glances.py +++ /dev/null @@ -1,37 +0,0 @@ -import xmlrpclib - - -def get_class_name(): - return "GlancesConnect" - - -class GlancesConnect: - def __init__(self, addr_host, params, key_loc, cnfe): - self.parameters = {"port": "int"} - self.name = get_class_name() - self.addr_host = addr_host - self.known_port = 61209 - self.CommandNotFoundException = cnfe - if params is not None: - self.glances_server = xmlrpclib.ServerProxy('http://' + addr_host + ':' + str(params['port'])) - - - def get_name(self): - return self.name - - def get_addr_host(self): - # Called by monitoring modules - return self.addr_host - - def get_parameters(self): - return self.parameters - - def get_known_port(self): - return self.known_port - - def exec_command(self, cmd): - out = getattr(self.glances_server, cmd)() - return out - - def disconnect(self): - self.glances_server = None \ No newline at end of file diff --git a/app/modules/monitoring_modules/cpu_glances.py b/app/modules/monitoring_modules/cpu_glances.py deleted file mode 100644 index df3de74..0000000 --- a/app/modules/monitoring_modules/cpu_glances.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf8 -*- -__author__ = 'aguilbaud' - -import json - -compatible_os = ['linux', 'freebsd', 'osx', 'windows'] -block = "hardware" -part = "CPU" -name = "CPU Glances" -unit = "%" -connection = "glances" - - -def check(conn, mnce, subparts): - """ - Returns the greatest between the user and system CPU charge - """ - cmd = "getCpu" - out = conn.exec_command(cmd) # '{"softirq": 0.0, "iowait": 0.1, "system": 1.1, "guest": 0.0, "idle": 96.4, - # "user": 2.3, "guest_nice": 0.0, "irq": 0.0, "steal": 0.0, "nice": 0.0}' - dict_res = json.loads(out) - try: - user_cpu_charge = dict_res["system"] - system_cpu_charge = dict_res["user"] - except KeyError: - exception_inst = getattr(mnce, "ModuleNotCompatibleException")( - part, conn.get_addr_host() - ) - raise exception_inst - res_cpu = max(user_cpu_charge, system_cpu_charge) - return res_cpu \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.