diff --git a/server/client.js b/server/client.js index 72f0a4e8e..421f89441 100644 --- a/server/client.js +++ b/server/client.js @@ -160,6 +160,7 @@ async function sendInfo(socket, hideVersion = false) { isContainer, dbType, primaryBaseURL: await setting("primaryBaseURL"), + serverIdentifier: await setting("serverIdentifier"), serverTimezone: await server.getTimezone(), serverTimezoneOffset: server.getTimezoneOffset(), }); diff --git a/server/notification-providers/slack.js b/server/notification-providers/slack.js index 5e25a1fbc..202aef12b 100644 --- a/server/notification-providers/slack.js +++ b/server/notification-providers/slack.js @@ -142,8 +142,12 @@ class Slack extends NotificationProvider { } const baseURL = await setting("primaryBaseURL"); + const serverIdentifier = await setting("serverIdentifier"); const title = "Uptime Kuma Alert"; + if (serverIdentifier) { + title = title + " (" + serverIdentifier + ")" + } let data = { "channel": notification.slackchannel, "username": notification.slackusername, diff --git a/server/notification-providers/smtp.js b/server/notification-providers/smtp.js index 9f3defa5e..4e614fa06 100644 --- a/server/notification-providers/smtp.js +++ b/server/notification-providers/smtp.js @@ -46,6 +46,11 @@ class SMTP extends NotificationProvider { let body = msg; if (heartbeatJSON) { body = `${msg}\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`; + + const serverIdentifier = await setting("serverIdentifier"); + if (serverIdentifier) { + body = body + `\nServer Identifier: ${serverIdentifier}` + } } // subject and body are templated if ((monitorJSON && heartbeatJSON) || msg.endsWith("Testing")) { diff --git a/src/components/settings/General.vue b/src/components/settings/General.vue index 487c3ba3a..82df5e958 100644 --- a/src/components/settings/General.vue +++ b/src/components/settings/General.vue @@ -132,6 +132,27 @@
+ +
+ + +
+ +
+ +
+
+