From 286f28962a734ccd6ac1399dad4dc0ee521430a9 Mon Sep 17 00:00:00 2001 From: Florian Eitel Date: Sun, 14 Jan 2024 01:08:24 +0100 Subject: [PATCH] Treat empty docker Health check as healthy to support podman Podman will include the Health dict even if no health check is defined for the container (see https://github.com/containers/podman/issues/20029). This makes the check in uptime-kuma stuck in Pending Fixes https://github.com/louislam/uptime-kuma/issues/3767 --- server/model/monitor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index b2fed86f578..a65769f8934 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -747,7 +747,8 @@ class Monitor extends BeanModel { let res = await axios.request(options); if (res.data.State.Running) { - if (res.data.State.Health && res.data.State.Health.Status !== "healthy") { + // treat empty Status as healthy for podman: https://github.com/louislam/uptime-kuma/issues/3767 + if (res.data.State.Health && !["healthy", ""].includes(res.data.State.Health.Status)) { bean.status = PENDING; bean.msg = res.data.State.Health.Status; } else {