|
|
@ -759,7 +759,6 @@ class Monitor extends BeanModel {
|
|
|
|
port = this.port;
|
|
|
|
port = this.port;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const resp = await radius(
|
|
|
|
const resp = await radius(
|
|
|
|
this.hostname,
|
|
|
|
this.hostname,
|
|
|
|
this.radiusUsername,
|
|
|
|
this.radiusUsername,
|
|
|
@ -768,20 +767,11 @@ class Monitor extends BeanModel {
|
|
|
|
this.radiusCallingStationId,
|
|
|
|
this.radiusCallingStationId,
|
|
|
|
this.radiusSecret,
|
|
|
|
this.radiusSecret,
|
|
|
|
port,
|
|
|
|
port,
|
|
|
|
this.interval * 1000 * 0.8,
|
|
|
|
this.interval * 1000 * 0.4,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if (resp.code) {
|
|
|
|
|
|
|
|
bean.msg = resp.code;
|
|
|
|
bean.msg = resp.code;
|
|
|
|
}
|
|
|
|
|
|
|
|
bean.status = UP;
|
|
|
|
bean.status = UP;
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
bean.status = DOWN;
|
|
|
|
|
|
|
|
if (error.response?.code) {
|
|
|
|
|
|
|
|
bean.msg = error.response.code;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
bean.msg = error.message;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
bean.ping = dayjs().valueOf() - startTime;
|
|
|
|
bean.ping = dayjs().valueOf() - startTime;
|
|
|
|
} else if (this.type === "redis") {
|
|
|
|
} else if (this.type === "redis") {
|
|
|
|
let startTime = dayjs().valueOf();
|
|
|
|
let startTime = dayjs().valueOf();
|
|
|
|