fix: Phase 2 P0 全清零 — 14 項安全與功能修復完成
Some checks failed
CD Pipeline / deploy (push) Failing after 2m59s
Some checks failed
CD Pipeline / deploy (push) Failing after 2m59s
P0-06: google_drive_service.py — pickle.load() 改 JSON token(消除 RCE 風險) P0-07: bot_api_routes.py:30 — BOT_API_TOKEN 移除硬編碼預設值 clawdbot_momo_2026 P0-08: auto_import_index.html — showAlert innerHTML 改 createTextNode(XSS 修復) P0-09: abc_analysis_detail.html + dashboard.html + daily_sales.html — Jinja2 | e 轉義 P0-10: openclaw_bot_routes.py:2634 — vendor PPT 補 return ppt_path(廠商報告恢復) P0-11: telegram_bot_service.py:177-214 — cmd_start/cmd_help 補 try/except P0-12: app.py:689-712 — 10 個 Blueprint 補齊 register(消滅 404 路由) P0-13: auto_heal_service.py — 實作 _write_heal_log(),AIOps 稽核閉環補完 P0-14: monitoring/prometheus.yml — 取消 alert_rules comment;新增 alert_rules.yml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
26
monitoring/alert_rules.yml
Normal file
26
monitoring/alert_rules.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
groups:
|
||||
- name: momo_pro_alerts
|
||||
rules:
|
||||
- alert: ContainerDown
|
||||
expr: up == 0
|
||||
for: 1m
|
||||
labels:
|
||||
severity: critical
|
||||
annotations:
|
||||
summary: "容器 {{ $labels.instance }} 已停止回應"
|
||||
|
||||
- alert: HighMemoryUsage
|
||||
expr: (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) < 0.1
|
||||
for: 2m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: "記憶體使用率超過 90%"
|
||||
|
||||
- alert: SchedulerTaskFailed
|
||||
expr: increase(scheduler_task_failures_total[5m]) > 0
|
||||
for: 0m
|
||||
labels:
|
||||
severity: warning
|
||||
annotations:
|
||||
summary: "排程任務失敗:{{ $labels.task_name }}"
|
||||
@@ -6,14 +6,14 @@ global:
|
||||
environment: 'uat'
|
||||
|
||||
# Alertmanager configuration (可選)
|
||||
# alerting:
|
||||
# alertmanagers:
|
||||
# - static_configs:
|
||||
# - targets: []
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets: []
|
||||
|
||||
# 規則檔案
|
||||
rule_files:
|
||||
# - "alerts.yml"
|
||||
- "alert_rules.yml"
|
||||
|
||||
# 監控目標配置
|
||||
scrape_configs:
|
||||
|
||||
Reference in New Issue
Block a user