Skip to content

Commit

Permalink
Treat empty docker Health check as healthy to support podman
Browse files Browse the repository at this point in the history
Podman will include the Health dict even if no health check is defined
for the container (see
containers/podman#20029).

This makes the check in uptime-kuma stuck in Pending

Fixes louislam#3767
  • Loading branch information
nougad committed Jan 14, 2024
1 parent 8456912 commit 286f289
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/model/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 286f289

Please sign in to comment.