From 1b293f2754413e391b8339540e46132796a886ba Mon Sep 17 00:00:00 2001 From: Stefan Heine Date: Mon, 19 Feb 2024 07:42:37 +0100 Subject: [PATCH 1/2] 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", () => { From 6bfc58674a2304ec8994005da87854635ed01734 Mon Sep 17 00:00:00 2001 From: Stefan Heine Date: Mon, 19 Feb 2024 07:57:34 +0100 Subject: [PATCH 2/2] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/monitor-types/mqtt.js b/server/monitor-types/mqtt.js index d9aaf964d..9b2db43d0 100644 --- a/server/monitor-types/mqtt.js +++ b/server/monitor-types/mqtt.js @@ -82,7 +82,7 @@ class MqttMonitorType extends MonitorType { let client = mqtt.connect(mqttUrl, { username, password, - clientId: 'uptime-kuma_' + Math.random().toString(16).substr(2, 8) + clientId: "uptime-kuma_" + Math.random().toString(16).substr(2, 8) }); client.on("connect", () => {