Skip to content

Commit

Permalink
fix louislam#3767 by @nougad - treat empty healthcheck reported by po…
Browse files Browse the repository at this point in the history
…dman as up
  • Loading branch information
vfosnar authored and louislam committed Jan 19, 2024
1 parent d736841 commit 7f5dfcc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/model/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,12 +770,12 @@ 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 === "unhealthy") {
bean.status = DOWN;
bean.msg = res.data.State.Health.Status;
} else if (res.data.State.Health && res.data.State.Health.Status !== "healthy") {
if (res.data.State.Health && ![ "healthy", "unhealthy", "" ].includes(res.data.State.Health.Status)) {
bean.status = PENDING;
bean.msg = res.data.State.Health.Status;
} else if (res.data.State.Health && res.data.State.Health.Status === "unhealthy") {
bean.status = 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;
Expand Down

0 comments on commit 7f5dfcc

Please sign in to comment.