[alerter] 告警处理指标数据,告警表达式计算,内容模版关键字替换

This commit is contained in:
tomsun28
2021-12-10 12:54:42 +08:00
parent 29b3e23d02
commit 370224f5cf
23 changed files with 693 additions and 44 deletions

View File

@@ -80,7 +80,7 @@ CREATE TABLE alert_define
duration int not null comment '触发告警后持续时间,单位s',
enable boolean not null default true comment '告警触发后是否发送',
delay int not null comment '告警延迟时间,即延迟多久再发送告警,单位s',
content varchar(255) not null comment '告警通知内容',
template varchar(255) not null comment '告警通知模板内容',
creator varchar(100) comment '创建者',
modifier varchar(100) comment '最新修改者',
gmt_create timestamp default current_timestamp comment 'create time',
@@ -101,7 +101,7 @@ CREATE TABLE alert_define_monitor_bind
gmt_create timestamp default current_timestamp comment 'create time',
gmt_update datetime default current_timestamp on update current_timestamp comment 'update time',
primary key (id),
unique key unique_bind (alert_define_id, monitor_id)
index index_bind (alert_define_id, monitor_id)
) ENGINE = InnoDB DEFAULT CHARSET=utf8mb4;