Skip to content

Commit e7eb0c0

Browse files
committed
Get statistics only for running containers. Fix #1281
1 parent 02451d8 commit e7eb0c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/docker/docker_

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def get_container_stats(container, q):
274274
def parallel_container_stats(client):
275275
proc_list = []
276276
stats = {}
277-
for container in client.all_containers:
277+
for container in [ c for c in client.all_containers if c.status == 'running' ]:
278278
q = Queue()
279279
p = Process(target=get_container_stats, args=(container, q))
280280
proc_list.append({'proc': p, 'queue': q, 'container': container})

0 commit comments

Comments
 (0)