mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-26 13:07:14 +00:00
feat(memory): add memory threshold alerts (#5366)
* feat(memory): add memory threshold alerts
Add memory (RAM) threshold alerts following the same architecture as
CPU alerts: CheckMemJob with @every 1m cadence, memoryAlarmWanted gate,
tgMemory/smtpMemory per-subscriber settings (default 80%), EventBusCheckboxes
with inline threshold input, i18n for en-US/ru-RU with English defaults.
# Conflicts:
# internal/web/translation/ar-EG.json
# internal/web/translation/es-ES.json
# internal/web/translation/fa-IR.json
# internal/web/translation/id-ID.json
# internal/web/translation/ja-JP.json
# internal/web/translation/pt-BR.json
# internal/web/translation/ru-RU.json
# internal/web/translation/tr-TR.json
# internal/web/translation/uk-UA.json
# internal/web/translation/vi-VN.json
# internal/web/translation/zh-CN.json
# internal/web/translation/zh-TW.json
* fix: address code review findings for memory alerts
- Remove dead settingService field from CheckMemJob
- Fix cpuThreshold double-emoji in 12 locale files (code prepends 🔴)
- Align TgCpu/TgMemory fields in entity.go
- Add missing SetTgMemory function
* fix: restore settingService in CheckMemJob for consistency with CheckCpuJob
This commit is contained in:
@@ -160,6 +160,12 @@
|
||||
"description": "SMTP server host",
|
||||
"type": "string"
|
||||
},
|
||||
"smtpMemory": {
|
||||
"description": "Memory threshold for email notifications",
|
||||
"maximum": 100,
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"smtpPassword": {
|
||||
"description": "SMTP password",
|
||||
"type": "string"
|
||||
@@ -335,6 +341,12 @@
|
||||
"description": "Telegram bot language",
|
||||
"type": "string"
|
||||
},
|
||||
"tgMemory": {
|
||||
"description": "Memory usage threshold for alerts (percent)",
|
||||
"maximum": 100,
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"tgRunTime": {
|
||||
"description": "Cron schedule for Telegram notifications",
|
||||
"type": "string"
|
||||
@@ -428,6 +440,7 @@
|
||||
"smtpEnabledEvents",
|
||||
"smtpEncryptionType",
|
||||
"smtpHost",
|
||||
"smtpMemory",
|
||||
"smtpPassword",
|
||||
"smtpPort",
|
||||
"smtpTo",
|
||||
@@ -470,6 +483,7 @@
|
||||
"tgCpu",
|
||||
"tgEnabledEvents",
|
||||
"tgLang",
|
||||
"tgMemory",
|
||||
"tgRunTime",
|
||||
"timeLocation",
|
||||
"trafficDiff",
|
||||
@@ -641,6 +655,12 @@
|
||||
"description": "SMTP server host",
|
||||
"type": "string"
|
||||
},
|
||||
"smtpMemory": {
|
||||
"description": "Memory threshold for email notifications",
|
||||
"maximum": 100,
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"smtpPassword": {
|
||||
"description": "SMTP password",
|
||||
"type": "string"
|
||||
@@ -816,6 +836,12 @@
|
||||
"description": "Telegram bot language",
|
||||
"type": "string"
|
||||
},
|
||||
"tgMemory": {
|
||||
"description": "Memory usage threshold for alerts (percent)",
|
||||
"maximum": 100,
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"tgRunTime": {
|
||||
"description": "Cron schedule for Telegram notifications",
|
||||
"type": "string"
|
||||
@@ -916,6 +942,7 @@
|
||||
"smtpEnabledEvents",
|
||||
"smtpEncryptionType",
|
||||
"smtpHost",
|
||||
"smtpMemory",
|
||||
"smtpPassword",
|
||||
"smtpPort",
|
||||
"smtpTo",
|
||||
@@ -958,6 +985,7 @@
|
||||
"tgCpu",
|
||||
"tgEnabledEvents",
|
||||
"tgLang",
|
||||
"tgMemory",
|
||||
"tgRunTime",
|
||||
"timeLocation",
|
||||
"trafficDiff",
|
||||
|
||||
Reference in New Issue
Block a user