mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-29 11:53:16 +02:00
fix(monitor): if monitor checks fail do not set a ping
This commit is contained in:
parent
668c5a77d6
commit
786db6dada
1 changed files with 4 additions and 2 deletions
|
@ -153,8 +153,6 @@ class Monitor extends BeanModel {
|
||||||
maxRedirects: this.maxredirects,
|
maxRedirects: this.maxredirects,
|
||||||
validateStatus: undefined,
|
validateStatus: undefined,
|
||||||
});
|
});
|
||||||
bean.msg = `${res.status} - ${res.statusText}`;
|
|
||||||
bean.ping = dayjs().valueOf() - startTime;
|
|
||||||
|
|
||||||
// Check certificate if https is used
|
// Check certificate if https is used
|
||||||
let certInfoStartTime = dayjs().valueOf();
|
let certInfoStartTime = dayjs().valueOf();
|
||||||
|
@ -170,7 +168,11 @@ class Monitor extends BeanModel {
|
||||||
|
|
||||||
debug("Cert Info Query Time: " + (dayjs().valueOf() - certInfoStartTime) + "ms");
|
debug("Cert Info Query Time: " + (dayjs().valueOf() - certInfoStartTime) + "ms");
|
||||||
|
|
||||||
|
bean.msg = `${res.status} - ${res.statusText}`;
|
||||||
|
|
||||||
validateMonitorChecks(res, await this.getMonitorChecks(), bean);
|
validateMonitorChecks(res, await this.getMonitorChecks(), bean);
|
||||||
|
|
||||||
|
bean.ping = dayjs().valueOf() - startTime;
|
||||||
} else if (this.type === "port") {
|
} else if (this.type === "port") {
|
||||||
bean.ping = await tcping(this.hostname, this.port);
|
bean.ping = await tcping(this.hostname, this.port);
|
||||||
bean.msg = "";
|
bean.msg = "";
|
||||||
|
|
Loading…
Add table
Reference in a new issue