mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
Compare commits
6 Commits
e2bddbf64e
...
ae3276cf90
Author | SHA1 | Date | |
---|---|---|---|
|
ae3276cf90 | ||
|
2ba9337342 | ||
|
0b0f081a13 | ||
|
0b478404cf | ||
|
7f5dfcc051 | ||
|
d73684115a |
@ -774,12 +774,14 @@ 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") {
|
||||
bean.status = PENDING;
|
||||
if (res.data.State.Health) {
|
||||
// treat empty Status as healthy to support podman: https://github.com/louislam/uptime-kuma/issues/3767
|
||||
const containerIsHealthy = [ "", "healthy" ].includes(res.data.State.Health.Status);
|
||||
bean.status = containerIsHealthy ? UP : DOWN;
|
||||
bean.msg = res.data.State.Health.Status;
|
||||
} else {
|
||||
bean.status = UP;
|
||||
bean.msg = res.data.State.Health ? res.data.State.Health.Status : res.data.State.Status;
|
||||
bean.status = DOWN;
|
||||
bean.msg = res.data.State.Status;
|
||||
}
|
||||
} else {
|
||||
throw Error("Container State is " + res.data.State.Status);
|
||||
|
Loading…
Reference in New Issue
Block a user