From 13b49bb4171185720ffe15924268bb9d6459f028 Mon Sep 17 00:00:00 2001 From: mkdev11 Date: Mon, 5 Jan 2026 15:56:26 +0200 Subject: [PATCH 1/2] feat: add monitored URL link to Google Chat notifications Add the monitored service URL as a clickable link in Google Chat notifications, allowing users to quickly navigate to the affected service for immediate investigation. Closes #5952 --- server/notification-providers/google-chat.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/notification-providers/google-chat.js b/server/notification-providers/google-chat.js index 2557a142c..c05830d93 100644 --- a/server/notification-providers/google-chat.js +++ b/server/notification-providers/google-chat.js @@ -80,6 +80,15 @@ class GoogleChat extends NotificationProvider { }); } + // add monitor URL if available + if (monitorJSON && monitorJSON["url"]) { + sectionWidgets.push({ + textParagraph: { + text: `URL:\n${monitorJSON["url"]}`, + }, + }); + } + // add button for monitor link if available const baseURL = await setting("primaryBaseURL"); if (baseURL) { From 4cad39740ed8837d54e4582fe743cb956a4af08d Mon Sep 17 00:00:00 2001 From: mkdev11 Date: Tue, 6 Jan 2026 01:06:37 +0200 Subject: [PATCH 2/2] refactor: use extractAddress() method for monitor address Address review feedback from CommanderStorm to use the inherited extractAddress() method instead of directly accessing monitorJSON["url"]. This properly handles different monitor types (ping, port, dns, etc.). --- server/notification-providers/google-chat.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/notification-providers/google-chat.js b/server/notification-providers/google-chat.js index c05830d93..b9614d4a9 100644 --- a/server/notification-providers/google-chat.js +++ b/server/notification-providers/google-chat.js @@ -80,11 +80,12 @@ class GoogleChat extends NotificationProvider { }); } - // add monitor URL if available - if (monitorJSON && monitorJSON["url"]) { + // add monitor address if available + const address = this.extractAddress(monitorJSON); + if (address) { sectionWidgets.push({ textParagraph: { - text: `URL:\n${monitorJSON["url"]}`, + text: `Address:\n${address}`, }, }); }