Skip to content

fix(notifications): use real server name in remote threshold alerts#58

Open
AminDhouib wants to merge 2 commits into
canaryfrom
port/upr-4791
Open

fix(notifications): use real server name in remote threshold alerts#58
AminDhouib wants to merge 2 commits into
canaryfrom
port/upr-4791

Conversation

@AminDhouib

@AminDhouib AminDhouib commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

Server CPU/Memory threshold notifications for remote servers always rendered Server Name: Remote, making alerts indistinguishable when multiple remote servers are registered. The remote branch of notification.receiveNotification already fetches the matching server row by metrics token but discarded its name. This uses the fetched row's real name, falling back to "Remote" only if absent:

ServerName = result?.[0]?.name ?? "Remote";

All channels (Telegram/Discord/Slack/etc.) share the same payload.ServerName, so all are fixed by this one line. The Dokploy web-server branch is unaffected.

Ports Dokploy#4791 by @PixelPerfector (authorship preserved via cherry-pick).

No issues are closed by this change. The upstream PR body explicitly states no issue reports this exact bug and that Dokploy#3589 is only related (it concerns the server restart notification, a separate notification/feature request) — so Dokploy#3589 is intentionally not listed as addressed here.

Adaptations

None — clean cherry-pick of upstream commit e19dd43 onto canary.

Verification

  • pnpm --filter=dokploy run typecheck — pass (also proves .name exists on the selected server row type)

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) <noreply@anthropic.com>
(cherry picked from commit e19dd43)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants