{{ if gt (len .Alerts.Firing) 0 }}
{{ .Alerts | len }} alert{{ if gt (len .Alerts) 1 }}s{{ end }} for {{ range .GroupLabels.SortedPairs }}
{{ .Name }}={{ .Value }}
{{ end }}
|
{{ else }}
{{ .Alerts | len }} alert{{ if gt (len .Alerts) 1 }}s{{ end }} for {{ range .GroupLabels.SortedPairs }}
{{ .Name }}={{ .Value }}
{{ end }}
|
{{ end }}
View in {{ template "__alertmanager" . }}
|
{{ if gt (len .Alerts.Firing) 0 }}
[{{ .Alerts.Firing | len }}] Firing
|
{{ end }}
{{ range .Alerts.Firing }}
Labels
{{ range .Labels.SortedPairs }}{{ .Name }} = {{ .Value }} {{ end }}
{{ if gt (len .Annotations) 0 }}Annotations {{ end }}
{{ range .Annotations.SortedPairs }}{{ .Name }} = {{ .Value }} {{ end }}
Source
|
{{ end }}
{{ if gt (len .Alerts.Resolved) 0 }}
{{ if gt (len .Alerts.Firing) 0 }}
|
{{ end }}
[{{ .Alerts.Resolved | len }}] Resolved
|
{{ end }}
{{ range .Alerts.Resolved }}
Labels
{{ range .Labels.SortedPairs }}{{ .Name }} = {{ .Value }} {{ end }}
{{ if gt (len .Annotations) 0 }}Annotations {{ end }}
{{ range .Annotations.SortedPairs }}{{ .Name }} = {{ .Value }} {{ end }}
Source
|
{{ end }}
|