diff --git a/config/email.tmpl b/config/email.tmpl index 48ced598e..9de3463ce 100644 --- a/config/email.tmpl +++ b/config/email.tmpl @@ -1,6 +1,6 @@ {{ define "email.to.html" }} {{ range .Alerts }} - +--------------------------------------------------------- 告警程序: prometheus_alert
告警级别: {{ .Labels.severity }} 级
告警类型: {{ .Labels.alertname }}
@@ -8,6 +8,6 @@ 故障服务: {{ .Labels.job }}
告警主题: {{ .Annotations.summary }}
触发时间: {{ .StartsAt.Format "2020-01-02 15:04:05"}}
- +---------------------------------------------------------- {{ end }} {{ end }} \ No newline at end of file diff --git a/config/instanceDown_rules.yml b/config/instanceDown_rules.yml index b266e4e73..72b1f5aa3 100644 --- a/config/instanceDown_rules.yml +++ b/config/instanceDown_rules.yml @@ -1,11 +1,11 @@ groups: - - name: node_down + - name: instance_down rules: - alert: InstanceDown expr: up == 0 for: 1m labels: - user: test + severity: critical annotations: summary: "Instance {{ $labels.instance }} down" description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 1 minutes." \ No newline at end of file