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}} - 触发时间: