ready for runners
This commit is contained in:
parent
fc9971ddc9
commit
7dd5043b5d
49 changed files with 2569 additions and 1085 deletions
28
nixos/hosts/monitoring/provisioning/templates/telegram.tmpl
Normal file
28
nixos/hosts/monitoring/provisioning/templates/telegram.tmpl
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{{ define "alert_list" }}{{ range . }}
|
||||
---
|
||||
🪪 <b>{{ .Labels.alertname }}</b>
|
||||
{{- if eq .Labels.severity "critical" }}
|
||||
🚨 CRITICAL 🚨 {{ end }}
|
||||
{{- if eq .Labels.severity "warning" }}
|
||||
⚠️ WARNING ⚠️{{ end }}
|
||||
{{- 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="https://grafana.prod.global:3000">Grafana</a> 💊 <a href="https://alertmanager.prod.global:9093">Alertmanager</a> 💊 <a href="https://">Any other link</a> 🛠
|
||||
{{ end }}
|
||||
|
||||
{{ define "telegram.message" }}
|
||||
{{ if gt (len .Alerts.Firing) 0 }}
|
||||
🔥 Alerts Firing 🔥
|
||||
{{ template "alert_list" .Alerts.Firing }}
|
||||
{{ end }}
|
||||
{{ if gt (len .Alerts.Resolved) 0 }}
|
||||
✅ Alerts Resolved ✅
|
||||
{{ template "alert_list" .Alerts.Resolved }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue