feat: add alert silence - #7630
Open
mabed-fr wants to merge 7 commits into
Open
Conversation
added 4 commits
July 25, 2026 15:43
Adds monitor silencing (alert acknowledgment) inspired by Nagios/Zabbix/Centreon ACK. - New migration: 4 columns on monitor table (silenced, silence_message, silenced_at, silenced_by) - New socket handler: silenceMonitor (validates DOWN state + non-empty reason) and unsilenceMonitor - monitor.js: suppress notifications and resend intervals when silenced; auto-clear silence on UP recovery via R.exec to avoid runtime property conflicts with R.store - uptime-kuma-server.js: add sendUpdateMonitorIntoListByUserID for background (no-socket) context - All timestamps stored as UTC (dayjs.utc()) consistent with existing heartbeat handling Resolves louislam#7628
- Details.vue: Silence/Unsilence buttons (Silence only when DOWN), mandatory reason modal, silenced info banner, violet badge, event history shows distinct Silenced badge (identified by msg prefix, user reason displayed without prefix) - MonitorList.vue: filterState.showSilenced hides silenced monitors by default; bulk Silence action in Actions dropdown with DOWN-only validation (blocks entirely if any UP monitor selected) - MonitorListFilter.vue: Silenced toggle in Status dropdown between Maintenance and Pending; numFiltersActive handles boolean filterState values correctly - MonitorListItem.vue: violet silence-badge with bell-slash icon next to monitor name - socket.js: stats.silenced counter; skip toast for heartbeat events with type:"silence" - icon.js: register faBell and faBellSlash - vars.scss: $silenced: #8b5cf6 - app.scss: .bg-silenced and .text-silenced utility classes
17 new keys in en.json (Silence, Unsilence, Silenced, silenceMonitor, silenceMonitorDesc, silenceMessage, silenceMessagePlaceholder, silencedMonitorMsg, silencedAt, successSilenced, successUnsilenced, silenceMessageRequired, silenceOnlyDownMonitor, silencedMonitorsMsg, noMonitorsSilencedMsg, bulkSilenceErrorMsg, silenceOnlyDownMonitorBulk). English fallback values propagated to 69 language files.
Contributor
|
Thanks for the PR! If anyone would like to help with testing, run: |
added 2 commits
July 26, 2026 09:55
… lang files Remove silence feature keys whose values were identical to the English source strings — the app already falls back to en.json for missing keys, so explicit English copies in other language files are redundant and misleading. - 13 languages had all 17 keys in English (fully untranslated): removed all - 55 languages had 4 plural/bulk keys still in English: removed those 4 - fr-FR.json: kept "Silence" (correct French word), removed only the 4 bulk keys - en.json and en_GB.json: untouched
- unsilenceMonitor socket handler now requires a reason message (same as silence) - Inserts a heartbeat log entry prefixed with "Unsilenced:" on manual unsilence - Emits heartbeat event with type:"silence" to skip toast notification - Details.vue: Unsilence button opens a modal with mandatory reason field, identical UX and violet color scheme as the Silence modal - History table: shows violet "Unsilenced" badge (bell icon) for unsilence entries, strips prefix from displayed message - i18n: add unsilenceMonitor, unsilenceMonitorDesc, unsilenceMessage, unsilenceMessagePlaceholder, unsilenceMessageRequired, Unsilenced keys
Contributor
|
Hi @mabed-fr! I didn't review the PR, but be cautious about translations: you musn't perform any translation within the files, except for english. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds Alert Silence (alert acknowledgment) to Uptime Kuma — a feature long requested by users coming from tools like Nagios, Zabbix, and Centreon.
The core idea: when an on-call engineer is already aware of a DOWN incident, Uptime Kuma keeps firing repeated notifications with no operational value. There was no way to say "I know, I'm on it" without either pausing the monitor (which stops checks and corrupts uptime metrics) or disabling notifications entirely (which affects all monitors).
This is my first contribution to the Uptime Kuma project. I did my best to follow the project's coding standards and conventions, and I welcome any feedback or suggestions for improvement.
AI assistance was used to help generate and refine the documentation, as well as to update the translated language files. All AI-assisted modifications were carefully reviewed, validated, and approved before being committed. The feature implementation, validation, and integration testing were performed manually. Extensive testing was carried out to verify the new functionality and to ensure it does not introduce regressions or impact existing features.
Changes made:
silenceMonitor/unsilenceMonitorsocket events — validated server-side: requires a non-empty reason, monitor must be DOWN, user must own the monitor.monitor:silenced,silence_message,silenced_at,silenced_by.en.json, propagated with English fallback to all 69 other language files.#8b5cf6, the conventional ACK color in monitoring tools, distinct from all existing status colors.Resolves #7628
Please follow this checklist to avoid unnecessary back and forth (click to expand)
I understand that I am responsible for and able to explain every line of code I submit.
Screenshots for Visual Changes
Monitor Status Menu
Bulk Actions Menu
Error When One or More Selected Monitors Are Not Down
Silence Button
Silence Dialog for a Single Monitor
History Entry
Silenced Monitor Information Banner
Availability Status Colors