Done for FS and NETWORK. To be tested

This commit is contained in:
Nicolargo 2016-02-26 11:42:47 +01:00
parent 5785fcff28
commit 2cb24a88be
2 changed files with 6 additions and 6 deletions

View File

@ -67,9 +67,9 @@ careful=50
warning=70 warning=70
critical=90 critical=90
#[network] [network]
# Define the list of hidden network interfaces (comma separeted regexp) # Define the list of hidden network interfaces (comma separeted regexp)
hide=docker0 hide=docker.*
# WLAN 0 alias # WLAN 0 alias
#wlan0_alias=Wireless IF #wlan0_alias=Wireless IF
# WLAN 0 Default limits (in bits per second aka bps) for interface bitrate # WLAN 0 Default limits (in bits per second aka bps) for interface bitrate
@ -84,13 +84,13 @@ hide=docker0
[diskio] [diskio]
# Define the list of hidden disks (comma separeted regexp) # Define the list of hidden disks (comma separeted regexp)
hide=sda2,sda5 hide=sda2,sda5,loop.*
# Alias for sda1 # Alias for sda1
#sda1_alias=IntDisk #sda1_alias=IntDisk
[fs] [fs]
# Define the list of hidden file system (comma separeted regexp) # Define the list of hidden file system (comma separeted regexp)
hide=\/boot\/efi hide=/boot.*
# Define filesystem space thresholds in % # Define filesystem space thresholds in %
# Default values if not defined: 50/70/90 # Default values if not defined: 50/70/90
# It is also possible to define per mount point value # It is also possible to define per mount point value

View File

@ -515,8 +515,8 @@ class GlancesPlugin(object):
logger.info("value={}".format(value)) logger.info("value={}".format(value))
logger.info("hide={}".format(self.get_conf_value('hide', header=header))) 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("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)]))) 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(value, i) 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): def has_alias(self, header):
"""Return the alias name for the relative header or None if nonexist.""" """Return the alias name for the relative header or None if nonexist."""