fix: correlate log alert recovery lifecycle

This commit is contained in:
zxr
2026-07-21 22:15:59 +08:00
parent eaca3d0ac8
commit 8495fdf039
6 changed files with 194 additions and 99 deletions

View File

@@ -24,6 +24,10 @@ type SyslogRule struct {
KeywordRegex string `gorm:"size:512" json:"keyword_regex"`
// MessageRegex 表示消息正文匹配的正则表达式。
MessageRegex string `gorm:"size:1024" json:"message_regex"`
// RecoveryMatchRegex 匹配同一生命周期的恢复消息。
RecoveryMatchRegex string `gorm:"size:1024" json:"recovery_match_regex"`
// LifecycleKey 将故障和恢复事件绑定到同一告警生命周期。
LifecycleKey string `gorm:"size:256" json:"lifecycle_key"`
// AlertName 表示告警名称。
AlertName string `gorm:"size:256" json:"alert_name"`
// SeverityCode 表示严重级别编码。