优化(wecom-public-health-alert-diagnostics-and-debounce): 增强公网健康告警诊断与防抖
这个提交包含在:
@@ -18,6 +18,7 @@ from pathlib import Path
|
||||
SAFE_TOKEN = re.compile(r"^[A-Za-z0-9_-]{1,160}$")
|
||||
ALLOWED_STATUSES = {
|
||||
"FAIL_APP_HEALTH",
|
||||
"FAIL_APP_HEALTH_FLAPPING",
|
||||
"FAIL_AUTOMATIC_BACKUP",
|
||||
"FAIL_OFFHOST_DEADMAN",
|
||||
"PASS_APP_HEALTH_READY",
|
||||
@@ -131,7 +132,13 @@ def should_send(previous: dict[str, object], status: str, category: str) -> bool
|
||||
|
||||
|
||||
def safe_text(status: str, category: str) -> str:
|
||||
if status.startswith("FAIL_"):
|
||||
if status == "FAIL_APP_HEALTH":
|
||||
headline = "OA 公网健康告警"
|
||||
elif status == "FAIL_APP_HEALTH_FLAPPING":
|
||||
headline = "OA 公网健康链路反复抖动"
|
||||
elif status == "PASS_APP_HEALTH_READY":
|
||||
headline = "OA 公网健康恢复"
|
||||
elif status.startswith("FAIL_"):
|
||||
headline = "内部 OA 运维告警"
|
||||
elif status == "PASS_WITH_FINDINGS":
|
||||
headline = "内部 OA 运维提醒"
|
||||
|
||||
在新工单中引用
屏蔽一个用户