Commit ec6f8893 authored by GGGitBoy's avatar GGGitBoy Committed by Denise
Browse files

Send detail information after alert is resolved

https://github.com/rancher/rancher/issues/24156
Showing with 12 additions and 0 deletions
+12 -0
......@@ -52,10 +52,16 @@ The metric {{ .CommonLabels.alert_name}} crossed the threshold
{{ end -}}
{{- define "__text_list" -}}
{{- if eq .Status "resolved" -}}
{{ range .Alerts.Resolved }}
{{ template "__text_single" . }}
{{ end -}}
{{- else}}
{{ range .Alerts.Firing }}
{{ template "__text_single" . }}
{{ end -}}
{{ end -}}
{{ end -}}
{{- define "__text_single" -}}
Alert Name: {{ .Labels.alert_name}}
......@@ -124,10 +130,16 @@ Logs: {{ .Labels.logs}}
{{ end -}}
{{- define "__email_text_list" -}}
{{- if eq .Status "resolved" -}}
{{ range .Alerts.Resolved }}
{{ template "__email_text_single" . }}
{{ end -}}
{{- else}}
{{ range .Alerts.Firing }}
{{ template "__email_text_single" . }}
{{ end -}}
{{ end -}}
{{ end -}}
{{- define "__email_text_single" -}}
Alert Name: {{ .Labels.alert_name}}<br>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment