Commit 1e7b5618 authored by jithu.tagore's avatar jithu.tagore

Update infra_as_service_monitor.py

parent 7fb4efb8
......@@ -174,10 +174,12 @@ def docker_container():
docker_client = docker.from_env()
print("2")
containers = docker_client.containers.list(all=True)
print("3")
for i in containers:
if i.attrs["State"]["Status"] == "running":
container_restart.append(i)
data.append([i.name, i.id, i.attrs["State"]["Status"]])
print(data)
def status(service_name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment