From 67f43473d7a3209da4ccdded6d16ccf58ba565ce Mon Sep 17 00:00:00 2001 From: kongfei Date: Mon, 8 Aug 2022 10:32:36 +0800 Subject: [PATCH 1/2] v5.10.2 --- scripts/a-n9e.sql | 2 ++ tpl/README.md | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tpl/README.md diff --git a/scripts/a-n9e.sql b/scripts/a-n9e.sql index 76d8a2c..3ad36cb 100644 --- a/scripts/a-n9e.sql +++ b/scripts/a-n9e.sql @@ -402,6 +402,7 @@ CREATE TABLE `alert_cur_event` ( `notify_cur_number` int not null default 0 comment '', `target_ident` varchar(191) not null default '' comment 'target ident, also in tags', `target_note` varchar(191) not null default '' comment 'target note', + `first_trigger_time` bigint, `trigger_time` bigint not null, `trigger_value` varchar(255) not null, `tags` varchar(1024) not null default '' comment 'merge data_tags rule_tags, split by ,,', @@ -436,6 +437,7 @@ CREATE TABLE `alert_his_event` ( `notify_cur_number` int not null default 0 comment '', `target_ident` varchar(191) not null default '' comment 'target ident, also in tags', `target_note` varchar(191) not null default '' comment 'target note', + `first_trigger_time` bigint, `trigger_time` bigint not null, `trigger_value` varchar(255) not null, `recover_time` bigint not null default 0, diff --git a/tpl/README.md b/tpl/README.md new file mode 100644 index 0000000..24050ff --- /dev/null +++ b/tpl/README.md @@ -0,0 +1,26 @@ +# 告警消息模版文件 + +模版中可以使用的变量参考`AlertCurEvent`对象 +模版语法如何使用可以参考[html/template](https://pkg.go.dev/html/template) + +## 如何在告警模版中添加监控详情url + +假设web的地址是http://127.0.0.1:18000/, 实际使用时用web地址替换该地址 + +在监控模版中添加以下行: + +* dingtalk / wecom / feishu +```markdown +[监控详情](http://127.0.0.1:18000/metric/explorer?promql={{ .PromQl | escape }}) +``` + +* mailbody + +```html + + 监控详情: + + 点击查看 + + +``` \ No newline at end of file From b3cc4112dbf2ca246500af3b2308562b200c61a0 Mon Sep 17 00:00:00 2001 From: kongfei Date: Mon, 8 Aug 2022 10:33:34 +0800 Subject: [PATCH 2/2] update to v5.10.2 --- values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/values.yaml b/values.yaml index a9ba6d0..1f91f20 100644 --- a/values.yaml +++ b/values.yaml @@ -213,7 +213,7 @@ nwebapi: automountServiceAccountToken: false image: repository: flashcatcloud/nightingale - tag: 5.10.1 + tag: 5.10.2 nodeSelector: {} tolerations: [] affinity: {} @@ -231,7 +231,7 @@ nserver: automountServiceAccountToken: false image: repository: flashcatcloud/nightingale - tag: 5.10.1 + tag: 5.10.2 nodeSelector: {} tolerations: [] affinity: {}