|
|
@ -203,7 +203,7 @@ class Monitor extends BeanModel {
|
|
|
|
let previousBeat = null;
|
|
|
|
let previousBeat = null;
|
|
|
|
let retries = 0;
|
|
|
|
let retries = 0;
|
|
|
|
|
|
|
|
|
|
|
|
let prometheus = new Prometheus(this);
|
|
|
|
this.prometheus = new Prometheus(this);
|
|
|
|
|
|
|
|
|
|
|
|
const beat = async () => {
|
|
|
|
const beat = async () => {
|
|
|
|
|
|
|
|
|
|
|
@ -755,7 +755,7 @@ class Monitor extends BeanModel {
|
|
|
|
await R.store(bean);
|
|
|
|
await R.store(bean);
|
|
|
|
|
|
|
|
|
|
|
|
log.debug("monitor", `[${this.name}] prometheus.update`);
|
|
|
|
log.debug("monitor", `[${this.name}] prometheus.update`);
|
|
|
|
prometheus.update(bean, tlsInfo);
|
|
|
|
this.prometheus.update(bean, tlsInfo);
|
|
|
|
|
|
|
|
|
|
|
|
previousBeat = bean;
|
|
|
|
previousBeat = bean;
|
|
|
|
|
|
|
|
|
|
|
@ -840,15 +840,15 @@ class Monitor extends BeanModel {
|
|
|
|
clearTimeout(this.heartbeatInterval);
|
|
|
|
clearTimeout(this.heartbeatInterval);
|
|
|
|
this.isStop = true;
|
|
|
|
this.isStop = true;
|
|
|
|
|
|
|
|
|
|
|
|
this.prometheus().remove();
|
|
|
|
this.prometheus.remove();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Get a new prometheus instance
|
|
|
|
* Get prometheus instance
|
|
|
|
* @returns {Prometheus}
|
|
|
|
* @returns {Prometheus|undefined}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
prometheus() {
|
|
|
|
getPrometheus() {
|
|
|
|
return new Prometheus(this);
|
|
|
|
return this.prometheus;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|