1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2025-09-16 09:26:42 +02:00

Add monitor id label to prometheus metrics (#5907)
Some checks failed
Automatically close stale issues / stale (push) Has been cancelled
Auto Test / e2e-test (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
validate / json-yaml-validate (push) Has been cancelled
validate / validate (push) Has been cancelled
Auto Test / armv7-simple-test (18, ARMv7) (push) Has been cancelled
Auto Test / armv7-simple-test (20, ARMv7) (push) Has been cancelled
Auto Test / check-linters (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
Auto Test / auto-test (18, ARM64) (push) Has been cancelled
Auto Test / auto-test (18, macos-latest) (push) Has been cancelled
Auto Test / auto-test (18, ubuntu-latest) (push) Has been cancelled
Auto Test / auto-test (18, windows-latest) (push) Has been cancelled
Auto Test / auto-test (20, ARM64) (push) Has been cancelled
Auto Test / auto-test (20, macos-latest) (push) Has been cancelled
Auto Test / auto-test (20, ubuntu-latest) (push) Has been cancelled
Auto Test / auto-test (20, windows-latest) (push) Has been cancelled

This commit is contained in:
Manu
2025-06-12 12:31:01 +02:00
committed by GitHub
parent 8909cd008c
commit 53e83e7722

View File

@@ -2,6 +2,7 @@ const PrometheusClient = require("prom-client");
const { log } = require("../src/util");
const commonLabels = [
"monitor_id",
"monitor_name",
"monitor_type",
"monitor_url",
@@ -40,6 +41,7 @@ class Prometheus {
*/
constructor(monitor) {
this.monitorLabelValues = {
monitor_id: monitor.id,
monitor_name: monitor.name,
monitor_type: monitor.type,
monitor_url: monitor.url,