|
|
@ -626,9 +626,15 @@ class Monitor extends BeanModel {
|
|
|
|
|
|
|
|
|
|
|
|
log.debug("monitor", `[${this.name}] Axios Request`);
|
|
|
|
log.debug("monitor", `[${this.name}] Axios Request`);
|
|
|
|
let res = await axios.request(options);
|
|
|
|
let res = await axios.request(options);
|
|
|
|
|
|
|
|
|
|
|
|
if (res.data.State.Running) {
|
|
|
|
if (res.data.State.Running) {
|
|
|
|
bean.status = UP;
|
|
|
|
if (res.data.State.Health && res.data.State.Health.Status !== "healthy") {
|
|
|
|
bean.msg = res.data.State.Status;
|
|
|
|
bean.status = PENDING;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
throw Error("Container State is " + res.data.State.Status);
|
|
|
|
throw Error("Container State is " + res.data.State.Status);
|
|
|
|
}
|
|
|
|
}
|
|
|
|