Skip to content

Commit 3067885

Browse files
authored
Healthy status not taken into account in the containers count #50 (#51)
1 parent 4fc02ef commit 3067885

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

glances_api/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,11 @@ async def get_ha_sensor_data(self) -> dict[str, Any]:
188188
container
189189
for container in containers_data
190190
# "status" since Glance v4, "Status" in v3 and earlier
191+
# "healthy" status added to Glances 4.5 (see issue #50)
191192
if container.get("status") == "running"
192193
or container.get("Status") == "running"
194+
or container.get("status") == "healthy"
195+
or container.get("Status") == "healthy"
193196
]
194197
sensor_data["docker"] = {"docker_active": len(active_containers)}
195198
cpu_use = 0.0

0 commit comments

Comments
 (0)