Description
It'd be great if the list containers endpoint included the container's health status. Currently, monitoring containers requires multiple API calls.
- Call
/containers/json to get running containers
- Separate calls to
{id}/stats for each container to get resource usage
- Separate calls to
{id}/json for each container to get the health status
Including it in stats would also be an improvement, but I think including it in the container lists response makes the most sense. That way you could monitor the health of all containers on a host using a single endpoint:
[
{
"Id": "aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf",
"Names": [],
"Image": "docker.io/library/ubuntu:latest",
"ImageID": "sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782",
"ImageManifestDescriptor": {},
"Command": "/bin/bash",
"Created": "1739811096",
"Ports": [],
"SizeRw": "122880",
"SizeRootFs": "1653948416",
"Labels": {},
"State": "running",
"Health": "healthy",
"Status": "Up 4 days",
"HostConfig": {},
"NetworkSettings": {},
"Mounts": []
}
]
Description
It'd be great if the list containers endpoint included the container's
healthstatus. Currently, monitoring containers requires multiple API calls./containers/jsonto get running containers{id}/statsfor each container to get resource usage{id}/jsonfor each container to get the health statusIncluding it in
statswould also be an improvement, but I think including it in the container lists response makes the most sense. That way you could monitor the health of all containers on a host using a single endpoint:[ { "Id": "aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf", "Names": [], "Image": "docker.io/library/ubuntu:latest", "ImageID": "sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782", "ImageManifestDescriptor": {}, "Command": "/bin/bash", "Created": "1739811096", "Ports": [], "SizeRw": "122880", "SizeRootFs": "1653948416", "Labels": {}, "State": "running", "Health": "healthy", "Status": "Up 4 days", "HostConfig": {}, "NetworkSettings": {}, "Mounts": [] } ]