From 1b293f2754413e391b8339540e46132796a886ba Mon Sep 17 00:00:00 2001 From: Stefan Heine Date: Mon, 19 Feb 2024 07:42:37 +0100 Subject: [PATCH] MQTT monitor, set the MQTT clientId to make it easier in the MQTT broker to identify where the connections are coming from --- server/monitor-types/mqtt.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/monitor-types/mqtt.js b/server/monitor-types/mqtt.js index cff5c93d7..d9aaf964d 100644 --- a/server/monitor-types/mqtt.js +++ b/server/monitor-types/mqtt.js @@ -81,7 +81,8 @@ class MqttMonitorType extends MonitorType { let client = mqtt.connect(mqttUrl, { username, - password + password, + clientId: 'uptime-kuma_' + Math.random().toString(16).substr(2, 8) }); client.on("connect", () => {