From 2cb24a88be16393aa68f6984daa6ec062d7554d6 Mon Sep 17 00:00:00 2001 From: Nicolargo Date: Fri, 26 Feb 2016 11:42:47 +0100 Subject: [PATCH] Done for FS and NETWORK. To be tested --- conf/glances.conf | 8 ++++---- glances/plugins/glances_plugin.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/glances.conf b/conf/glances.conf index 21acfa00..53bc0be4 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -67,9 +67,9 @@ careful=50 warning=70 critical=90 -#[network] +[network] # Define the list of hidden network interfaces (comma separeted regexp) -hide=docker0 +hide=docker.* # WLAN 0 alias #wlan0_alias=Wireless IF # WLAN 0 Default limits (in bits per second aka bps) for interface bitrate @@ -84,13 +84,13 @@ hide=docker0 [diskio] # Define the list of hidden disks (comma separeted regexp) -hide=sda2,sda5 +hide=sda2,sda5,loop.* # Alias for sda1 #sda1_alias=IntDisk [fs] # Define the list of hidden file system (comma separeted regexp) -hide=\/boot\/efi +hide=/boot.* # Define filesystem space thresholds in % # Default values if not defined: 50/70/90 # It is also possible to define per mount point value diff --git a/glances/plugins/glances_plugin.py b/glances/plugins/glances_plugin.py index a8f31f46..09177660 100644 --- a/glances/plugins/glances_plugin.py +++ b/glances/plugins/glances_plugin.py @@ -515,8 +515,8 @@ class GlancesPlugin(object): logger.info("value={}".format(value)) logger.info("hide={}".format(self.get_conf_value('hide', header=header))) logger.info("match={}".format([re.match(value, i) for i in self.get_conf_value('hide', header=header)])) - logger.info("result={}".format(not all(j is None for j in [re.match(value, i) for i in self.get_conf_value('hide', header=header)]))) - return not all(j is None for j in [re.match(value, i) for i in self.get_conf_value('hide', header=header)]) + logger.info("result={}".format(not all(j is None for j in [re.match(i, value) for i in self.get_conf_value('hide', header=header)]))) + return not all(j is None for j in [re.match(i, value) for i in self.get_conf_value('hide', header=header)]) def has_alias(self, header): """Return the alias name for the relative header or None if nonexist."""