Add hide filter to Docker list (first part of #1748)

This commit is contained in:
nicolargo 2020-11-15 09:36:32 +01:00
parent 5f037bb833
commit bc0cf31a12
2 changed files with 6 additions and 0 deletions

View File

@ -327,6 +327,8 @@ port_default_gateway=True
[docker]
disable=False
# Hide some containers (comma separeted list)
#hide=telegraf
# Define the maximum docker size name (default is 20 chars)
max_name_size=20
#cpu_careful=50

View File

@ -210,6 +210,10 @@ class Plugin(GlancesPlugin):
# Get stats for all containers
stats['containers'] = []
for container in containers:
# Do not take hide container into account
if self.is_hide(nativestr(container.name)):
continue
# Init the stats for the current container
container_stats = {}
# The key is the container name and not the Id