mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
docker_: ignore contains which are not running
Some containers may be in "restarting" state. We should ignore these. Thanks, ogmueller! Closes: #1209
This commit is contained in:
parent
a3ae1af155
commit
c633ff00ea
1 changed files with 4 additions and 3 deletions
|
@ -143,9 +143,10 @@ class ClientWrapper:
|
|||
@cached_property
|
||||
@sorted_by_creation_date
|
||||
def all_containers(self):
|
||||
return [c for c in self.client.containers.list(all=True)
|
||||
if not self.exclude
|
||||
or not self.exclude.search(c.name)]
|
||||
return [
|
||||
c for c in self.client.containers.list(all=True)
|
||||
if (c.status == 'running') and (not self.exclude or not self.exclude.search(c.name))
|
||||
]
|
||||
|
||||
@cached_property
|
||||
@sorted_by_creation_date
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue