Untitled
unknown
plain_text
2 years ago
844 B
14
Indexable
parse_mode: 'Markdown'
title: '{{ template "telegram.title" . }}'
text: '{{ template "telegram.text" . }}'
templates:
- 'template': 'telegram.title'
'text': >-
{{- if eq .Status "firing" -}}
🚨 *{{ .CommonLabels.severity }}* Alert: {{ .CommonLabels.alertname }} is *{{ .Status }}*
{{- else -}}
🟢 *{{ .CommonLabels.severity }}* Alert: {{ .CommonLabels.alertname }} is *{{ .Status }}*
{{- end -}}
- 'template': 'telegram.text'
'text': >-
{{- range .Alerts -}}
*Description:* {{ .Annotations.description }}
*Details:* {{ .Annotations.details }}
*Severity:* {{ .Labels.severity }}
*Service:* {{ .Labels.service }}
*Node:* {{ .Labels.instance }}
*Value:* {{ .Annotations.value }}
*Starts at:* {{ .StartsAt.Format "2006-01-02 15:04:05" }}
{{- end -}}Editor is loading...
Leave a Comment