mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 17:50:44 +08:00
feat(ume): keyword key-alert rules with label and case-insensitive match
Add description keyword matching alongside notificationId rules, require per-rule labels, and improve the AI monitor form layout and clear-on-push UX. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
99e7b1557f
commit
34db62c8d2
11 changed files with 449 additions and 134 deletions
|
|
@ -337,7 +337,7 @@ const en = {
|
|||
},
|
||||
keyAlert: {
|
||||
title: "AI alarm monitor (OClaw WhatsApp)",
|
||||
help: "Match UME key alarms by notificationId and push via OClaw WebSocket. Auth shares NETX_OCLAW_ANALYZE_TOKEN / OCLAW_OPS_AI_SHARED_TOKEN; set NETX_OCLAW_ALARM_WS_URL separately.",
|
||||
help: "Exact match by notificationId, or substring match on alarm description (case-insensitive; nativeProbableCause, etc.), pushed via OClaw WebSocket. Shares NETX_OCLAW_ANALYZE_TOKEN.",
|
||||
ws: "OClaw WSS",
|
||||
wsConnected: "connected",
|
||||
wsDisconnected: "disconnected",
|
||||
|
|
@ -345,25 +345,33 @@ const en = {
|
|||
publishedOk: "published ok",
|
||||
publishedFail: "published fail",
|
||||
queue: "queue",
|
||||
notificationId: "notificationId",
|
||||
notificationIdPh: "Enter or pick notificationId",
|
||||
label: "label",
|
||||
labelPh: "optional, e.g. BGP Down",
|
||||
forwardOnClear: "forward clear events",
|
||||
add: "Add monitor ID",
|
||||
matchType: "Match by",
|
||||
matchNotificationId: "notificationId",
|
||||
matchKeyword: "description keyword",
|
||||
matchValuePhNotificationId: "Enter notificationId",
|
||||
matchValuePhKeyword: "Enter keyword (case-insensitive)",
|
||||
label: "Rule description",
|
||||
labelPh: "Required, e.g. BGP Down",
|
||||
forwardOnClear: "Push on alarm clear",
|
||||
forwardOnClearHelp: "By default only new/updated alarms are pushed. When enabled, a clear notification is also sent when UME reports the alarm cleared.",
|
||||
add: "Add rules",
|
||||
adding: "Adding…",
|
||||
delete: "Delete",
|
||||
pickFromAlarms: "Pick from current alarms",
|
||||
emptyRules: "No notificationId rules yet",
|
||||
colId: "notificationId",
|
||||
colLabel: "label",
|
||||
pickFromAlarms: "Load alarm hints",
|
||||
emptyRules: "No monitor rules yet",
|
||||
colType: "type",
|
||||
colMatch: "match",
|
||||
colLabel: "description",
|
||||
colForwardClear: "on clear",
|
||||
colPublished: "published",
|
||||
colAttempts: "attempts",
|
||||
colLast: "last push",
|
||||
colActions: "actions",
|
||||
addOk: "Rule added",
|
||||
addOk: "Monitor rule added",
|
||||
deleteOk: "Deleted",
|
||||
confirmDelete: "Delete this notificationId monitor rule?",
|
||||
confirmDelete: "Delete this monitor rule?",
|
||||
yes: "yes",
|
||||
no: "no",
|
||||
},
|
||||
sync: {
|
||||
title: "UME sync",
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ const zh = {
|
|||
},
|
||||
keyAlert: {
|
||||
title: "AI 告警监控(OClaw WhatsApp)",
|
||||
help: "按 notificationId 匹配 UME 关键告警,经 OClaw WebSocket 推送到 WhatsApp 群。鉴权与 NETX_OCLAW_ANALYZE_TOKEN / OCLAW_OPS_AI_SHARED_TOKEN 共用;另需配置 NETX_OCLAW_ALARM_WS_URL。",
|
||||
help: "按 notificationId 精确匹配,或按告警描述关键字模糊匹配(不区分大小写,匹配 nativeProbableCause 等字段),经 OClaw WebSocket 推送到 WhatsApp 群。鉴权与 NETX_OCLAW_ANALYZE_TOKEN 共用。",
|
||||
ws: "OClaw WSS",
|
||||
wsConnected: "已连接",
|
||||
wsDisconnected: "未连接",
|
||||
|
|
@ -343,25 +343,33 @@ const zh = {
|
|||
publishedOk: "发布成功",
|
||||
publishedFail: "发布失败",
|
||||
queue: "待发队列",
|
||||
notificationId: "notificationId",
|
||||
notificationIdPh: "输入或从下方选择 notificationId",
|
||||
matchType: "匹配方式",
|
||||
matchNotificationId: "告警码 (notificationId)",
|
||||
matchKeyword: "告警描述关键字",
|
||||
matchValuePhNotificationId: "输入 notificationId",
|
||||
matchValuePhKeyword: "输入匹配关键字(不区分大小写)",
|
||||
label: "规则描述",
|
||||
labelPh: "可选,如 BGP Down",
|
||||
forwardOnClear: "转发清除告警",
|
||||
add: "添加监控 ID",
|
||||
labelPh: "必填,如 BGP Down",
|
||||
forwardOnClear: "告警清除时也推送",
|
||||
forwardOnClearHelp: "默认只在告警新增/更新时推送。勾选后,当 UME 上报告警已清除(从当前告警表删除)时,也会向 WhatsApp 发送一条清除通知。",
|
||||
add: "添加规则",
|
||||
adding: "添加中…",
|
||||
delete: "删除",
|
||||
pickFromAlarms: "从当前告警选择",
|
||||
emptyRules: "尚未配置监控 notificationId",
|
||||
colId: "notificationId",
|
||||
pickFromAlarms: "加载当前告警参考",
|
||||
emptyRules: "尚未配置监控规则",
|
||||
colType: "类型",
|
||||
colMatch: "匹配内容",
|
||||
colLabel: "描述",
|
||||
colForwardClear: "清除推送",
|
||||
colPublished: "发布次数",
|
||||
colAttempts: "尝试次数",
|
||||
colLast: "最近推送",
|
||||
colActions: "操作",
|
||||
addOk: "已添加监控规则",
|
||||
deleteOk: "已删除",
|
||||
confirmDelete: "确定删除该 notificationId 监控规则?",
|
||||
confirmDelete: "确定删除该监控规则?",
|
||||
yes: "是",
|
||||
no: "否",
|
||||
},
|
||||
sync: {
|
||||
title: "UME 同步",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue