优化告警格式,增加 监控对象 (#918)
This commit is contained in:
parent
ee4a918fc7
commit
5333fb8eab
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
- **规则标题**: {{.RuleName}}{{if .RuleNote}}
|
- **规则标题**: {{.RuleName}}{{if .RuleNote}}
|
||||||
- **规则备注**: {{.RuleNote}}{{end}}
|
- **规则备注**: {{.RuleNote}}{{end}}
|
||||||
|
{{if not .IsRecovered}}- **触发时值**: {{.TriggerValue}}{{end}}
|
||||||
|
{{if .TargetIdent}}- **监控对象**: {{.TargetIdent}}{{end}}
|
||||||
- **监控指标**: {{.TagsJSON}}
|
- **监控指标**: {{.TagsJSON}}
|
||||||
- {{if .IsRecovered}}**恢复时间**:{{timeformat .LastEvalTime}}{{else}}**触发时间**: {{timeformat .TriggerTime}}
|
- {{if .IsRecovered}}**恢复时间**: {{timeformat .LastEvalTime}}{{else}}**触发时间**: {{timeformat .TriggerTime}}{{end}}
|
||||||
- **触发时值**: {{.TriggerValue}}{{end}}
|
|
||||||
- **发送时间**: {{timestamp}}
|
- **发送时间**: {{timestamp}}
|
||||||
|
|
||||||
|
|
|
@ -162,6 +162,19 @@
|
||||||
<th>设备备注:</th>
|
<th>设备备注:</th>
|
||||||
<td>{{.TargetNote}}</td>
|
<td>{{.TargetNote}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{{if not .IsRecovered}}
|
||||||
|
<tr>
|
||||||
|
<th>触发时值:</th>
|
||||||
|
<td>{{.TriggerValue}}</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if .TargetIdent}}
|
||||||
|
<tr>
|
||||||
|
<th>监控对象:</th>
|
||||||
|
<td>{{.TargetIdent}}</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
<tr>
|
<tr>
|
||||||
<th>监控指标:</th>
|
<th>监控指标:</th>
|
||||||
<td>{{.TagsJSON}}</td>
|
<td>{{.TagsJSON}}</td>
|
||||||
|
@ -173,10 +186,6 @@
|
||||||
<td>{{timeformat .LastEvalTime}}</td>
|
<td>{{timeformat .LastEvalTime}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{else}}
|
{{else}}
|
||||||
<tr>
|
|
||||||
<th>触发时值:</th>
|
|
||||||
<td>{{.TriggerValue}}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>触发时间:</th>
|
<th>触发时间:</th>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in New Issue