fix(monitoring): classify host memory pressure accurately

This commit is contained in:
ogt
2026-07-15 06:15:13 +08:00
parent 89595a7d8d
commit 5c0c5f6da2
11 changed files with 76 additions and 25 deletions

View File

@@ -11,11 +11,13 @@ alertname → incident_type 靜態對應表
擴展方式:在 alert_rules.yaml 中新增 incident_type 欄位;此 dict 僅需補無 YAML 規則的 alertname。
"""
# alertname → incident_type 對應56 筆)
# alertname → incident_type 對應;由測試驗證必要 taxonomy不用易漂移的手填筆數。
ALERTNAME_TO_TYPE: dict[str, str] = {
# --- 主機層 (host_alerts) ---
"HostDown": "host_down",
"HostHighCpuLoad": "host_cpu",
"HostMemoryUsageHigh": "host_memory",
# Historical alias for persisted incidents created before the taxonomy fix.
"HostOutOfMemory": "host_memory",
"HostOutOfDiskSpace": "disk_full",
"HostBackupFailed": "backup_failure",