Extend Prometheus Labels to include tags (requires restart for NEW labels on the monitor to be visible) (#4704)

Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
Thomas Spalinger
2024-08-24 18:02:57 +02:00
committed by GitHub
parent 2a820ab16d
commit 643d28cebc
2 changed files with 110 additions and 38 deletions

View File

@@ -336,7 +336,7 @@ class Monitor extends BeanModel {
let previousBeat = null;
let retries = 0;
this.prometheus = new Prometheus(this);
this.prometheus = await Prometheus.createAndInitMetrics(this);
const beat = async () => {
@@ -980,7 +980,7 @@ class Monitor extends BeanModel {
await R.store(bean);
log.debug("monitor", `[${this.name}] prometheus.update`);
this.prometheus?.update(bean, tlsInfo);
await this.prometheus?.update(bean, tlsInfo);
previousBeat = bean;