From 5333fb8eab949cd436b3ec2e417c44dcd48c0516 Mon Sep 17 00:00:00 2001 From: zheng Date: Tue, 19 Apr 2022 15:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=91=8A=E8=AD=A6=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F,=E5=A2=9E=E5=8A=A0=20=E7=9B=91=E6=8E=A7=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=20(#918)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/template/dingtalk.tpl | 6 +++--- etc/template/mailbody.tpl | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/etc/template/dingtalk.tpl b/etc/template/dingtalk.tpl index 45257512..cb456c54 100644 --- a/etc/template/dingtalk.tpl +++ b/etc/template/dingtalk.tpl @@ -4,8 +4,8 @@ - **规则标题**: {{.RuleName}}{{if .RuleNote}} - **规则备注**: {{.RuleNote}}{{end}} +{{if not .IsRecovered}}- **触发时值**: {{.TriggerValue}}{{end}} +{{if .TargetIdent}}- **监控对象**: {{.TargetIdent}}{{end}} - **监控指标**: {{.TagsJSON}} -- {{if .IsRecovered}}**恢复时间**:{{timeformat .LastEvalTime}}{{else}}**触发时间**: {{timeformat .TriggerTime}} -- **触发时值**: {{.TriggerValue}}{{end}} +- {{if .IsRecovered}}**恢复时间**: {{timeformat .LastEvalTime}}{{else}}**触发时间**: {{timeformat .TriggerTime}}{{end}} - **发送时间**: {{timestamp}} - diff --git a/etc/template/mailbody.tpl b/etc/template/mailbody.tpl index 3fc4cb56..95e6032f 100644 --- a/etc/template/mailbody.tpl +++ b/etc/template/mailbody.tpl @@ -162,6 +162,19 @@ 设备备注: {{.TargetNote}} + {{if not .IsRecovered}} + + 触发时值: + {{.TriggerValue}} + + {{end}} + + {{if .TargetIdent}} + + 监控对象: + {{.TargetIdent}} + + {{end}} 监控指标: {{.TagsJSON}} @@ -173,10 +186,6 @@ {{timeformat .LastEvalTime}} {{else}} - - 触发时值: - {{.TriggerValue}} - 触发时间: