Skip to content

Commit e19dd43

Browse files
fix(notifications): use real server name in remote threshold alerts
Server CPU/Memory threshold notifications for remote servers always showed "Server Name: Remote" instead of the actual server name, making it impossible to tell which server triggered the alert when more than one remote server is registered. The remote branch of receiveNotification already fetches the matching server row (looked up by its metrics token) but discarded it, hardcoding ServerName to the literal "Remote". Use the fetched row's name instead, falling back to "Remote" if it is somehow absent. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
1 parent 2e867c5 commit e19dd43

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/dokploy/server/api/routers/notification.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ export const notificationRouter = createTRPCRouter({
535535
}
536536

537537
organizationId = result?.[0]?.organizationId;
538-
ServerName = "Remote";
538+
ServerName = result?.[0]?.name ?? "Remote";
539539
}
540540

541541
await sendServerThresholdNotifications(organizationId, {

0 commit comments

Comments
 (0)