实现区域阈值告警任务

This commit is contained in:
2025-11-10 15:25:33 +08:00
parent 19d55eb09b
commit d4e8aba1fd
5 changed files with 190 additions and 20 deletions

View File

@@ -34,6 +34,17 @@ const (
// (可在此处预留或添加)
)
type Operator string
const (
OperatorLessThan Operator = "<"
OperatorLessThanOrEqualTo Operator = "<="
OperatorGreaterThan Operator = ">"
OperatorGreaterThanOrEqualTo Operator = ">="
OperatorEqualTo Operator = "="
OperatorNotEqualTo Operator = "!="
)
// ActiveAlarm 活跃告警
// 活跃告警会被更新(如忽略状态),因此保留 gorm.Model 以包含所有标准字段。
type ActiveAlarm struct {

View File

@@ -11,6 +11,13 @@ import (
"gorm.io/gorm"
)
const (
// PlanNamePeriodicSystemHealthCheck 是周期性系统健康检查计划的名称
PlanNamePeriodicSystemHealthCheck = "周期性系统健康检查"
// PlanNameAlarmNotification 是告警通知发送计划的名称
PlanNameAlarmNotification = "告警通知发送"
)
// PlanExecutionType 定义了计划的执行类型
type PlanExecutionType string