forked from linkedin/oncall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalerts.tmpl
24 lines (22 loc) · 893 Bytes
/
alerts.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{{ define "__lordvidex_text_alert_list" }}{{ range . }}
---
🪪 <b>{{ .Labels.alertname }}</b>
{{- if .Annotations.summary }}
📝 {{ .Annotations.summary }}{{ end }}
{{- if .Annotations.description }}
📖 {{ .Annotations.description }}{{ end }}
🏷 Labels:
{{ range .Labels.SortedPairs }} <i>{{ .Name }}</i>: <code>{{ .Value }}</code>
{{ end }}{{ end }}
🛠 <a href="http://158.160.118.124:9090/alerts?search=">Rules</a> 💊 <a href="http://158.160.118.124:9093/#/alerts">Alertmanager</a> 💊 <a href="http://158.160.118.124:9090/alerts/">Prometheus</a> 🛠
{{ end }}
{{ define "telegram.lordvidex.message" }}
{{ if gt (len .Alerts.Firing) 0 }}
🔥 Alerts Firing 🔥
{{ template "__lordvidex_text_alert_list" .Alerts.Firing }}
{{ end }}
{{ if gt (len .Alerts.Resolved) 0 }}
✅ Alerts Resolved ✅
{{ template "__lordvidex_text_alert_list" .Alerts.Resolved }}
{{ end }}
{{ end }}