Commit 38c7bea1 authored by jithu.tagore's avatar jithu.tagore

Update infra_as_service_monitor.py

parent 54ad19a8
...@@ -174,6 +174,7 @@ def docker_container(): ...@@ -174,6 +174,7 @@ def docker_container():
try: try:
docker_client = docker.from_env() docker_client = docker.from_env()
containers = docker_client.containers.list(all=True) containers = docker_client.containers.list(all=True)
time=datetime.datetime.now(tz=datetime.timezone.utc)
for i in containers: for i in containers:
if i.attrs["State"]["Status"] =="restarting" or i.attrs["State"]["Status"] =="exited": if i.attrs["State"]["Status"] =="restarting" or i.attrs["State"]["Status"] =="exited":
container_restart.append(i) container_restart.append(i)
......
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