From 4de99eb851c1f7165043a6a975b765e2b53fddb0 Mon Sep 17 00:00:00 2001 From: tellorian Date: Tue, 13 Jan 2026 11:08:42 +0900 Subject: [PATCH] feat(notification): expose path vars and improve Slack rich message (#6690) Co-authored-by: Frank Elsinga --- server/notification-providers/slack.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/server/notification-providers/slack.js b/server/notification-providers/slack.js index 2321fdd6e..bb5a834e0 100644 --- a/server/notification-providers/slack.js +++ b/server/notification-providers/slack.js @@ -90,6 +90,20 @@ class Slack extends NotificationProvider { }, }); + // Optional context line for monitor group path (excluding monitor name) + const groupPath = monitorJSON?.path?.length > 1 ? monitorJSON.path.slice(0, -1).join(" / ") : ""; + if (groupPath) { + blocks.push({ + type: "context", + elements: [ + { + type: "mrkdwn", + text: `_${groupPath}_`, + }, + ], + }); + } + // the body block, containing the details blocks.push({ type: "section", @@ -142,7 +156,7 @@ class Slack extends NotificationProvider { const baseURL = await setting("primaryBaseURL"); - const title = "Uptime Kuma Alert"; + const title = monitorJSON?.name || "Uptime Kuma Alert"; let data = { text: msg, channel: notification.slackchannel,