This commit is contained in:
Janne Nowak 2023-05-17 19:02:34 +02:00
parent f653aba735
commit 6b5e179bb0

View File

@ -575,16 +575,14 @@ class Monitor extends BeanModel {
log.debug("monitor", `[${this.name}] Axios Request`);
let res = await axios.request(options);
if (res.data.State.Health && res.data.State.Health.Status !== "healthy"){
if (res.data.State.Health && res.data.State.Health.Status !== "healthy") {
bean.status = PENDING;
bean.msg = res.data.State.Health.Status;
log.debug("monitor", `[${this.name}] Monitor is ${res.data.State.Health.Status}`);
}
else if (res.data.State.Running) {
} else if (res.data.State.Running) {
bean.status = UP;
bean.msg = res.data.State.Health? res.data.State.Health.Status:res.data.State.Status;
}
else {
bean.msg = res.data.State.Health ? res.data.State.Health.Status : res.data.State.Status;
} else {
throw Error("Container State is " + res.data.State.Status);
}
} else if (this.type === "mqtt") {