You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using non-ASCII characters (such as Chinese) in tag names, the system throws an "Invalid label name" error during Prometheus metrics initialization.
👟 Reproduction steps
Create a tag with a non-ASCII name (e.g., Chinese characters) in Uptime Kuma
Restart the Uptime Kuma service or trigger Prometheus metrics initialization
👀 Expected behavior
The system should handle non-ASCII tag names gracefully, either by converting them to valid Prometheus label names or by using a separate field for Prometheus-compatible names.
😓 Actual Behavior
The system crashes with an "Invalid label name" error when initializing Prometheus metrics.
🐻 Uptime-Kuma Version
2.0.0-dev
💻 Operating System and Arch
Ubuntu Linux
🌐 Browser
127.0.6533.120
🖥️ Deployment Environment
Runtime: Docker
Database: external mariadb
Filesystem used to store the database on: btrfs
number of monitors: 5
📝 Relevant log output
Error message:
Trace: Error: Invalid label name
at new Metric (/app/node_modules/prom-client/lib/metric.js:39:10)
at new Gauge (/app/node_modules/prom-client/lib/gauge.js:19:1)
at Prometheus.initMetrics (/app/server/prometheus.js:61:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Prometheus.createAndInitMetrics (/app/server/prometheus.js:96:9)
at async Proxy.start (/app/server/model/monitor.js:349:27)
at async startMonitors (/app/server/server.js:1805:9)
at process.unexpectedErrorHandler (/app/server/server.js:1859:13)
at process.emit (node:events:519:28)
at emitUnhandledRejection (node:internal/process/promises:250:13)
at throwUnhandledRejectionsMode (node:internal/process/promises:385:19)
at processPromiseRejections (node:internal/process/promises:470:17)
at process.processTicksAndRejections (node:internal/process/task_queues:96:32)
The text was updated successfully, but these errors were encountered:
📑 I have found these related issues/pull requests
No correlation has been found
🛡️ Security Policy
Description
When using non-ASCII characters (such as Chinese) in tag names, the system throws an "Invalid label name" error during Prometheus metrics initialization.
👟 Reproduction steps
👀 Expected behavior
The system should handle non-ASCII tag names gracefully, either by converting them to valid Prometheus label names or by using a separate field for Prometheus-compatible names.
😓 Actual Behavior
The system crashes with an "Invalid label name" error when initializing Prometheus metrics.
🐻 Uptime-Kuma Version
2.0.0-dev
💻 Operating System and Arch
Ubuntu Linux
🌐 Browser
127.0.6533.120
🖥️ Deployment Environment
📝 Relevant log output
The text was updated successfully, but these errors were encountered: