colmena initial implementation for sandbox and monitor
All checks were successful
Hello World / test (push) Successful in 4s
All checks were successful
Hello World / test (push) Successful in 4s
This commit is contained in:
parent
a90630ecb6
commit
5feb74d56d
40 changed files with 27629 additions and 141 deletions
29
machines/monitor/provisioning/templates/telegram.tmpl
Normal file
29
machines/monitor/provisioning/templates/telegram.tmpl
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{{ define "alert_list" }}{{ range . }}
|
||||
---
|
||||
🪪 <b>{{ .Labels.alertname | html }}</b>
|
||||
{{- if eq .Labels.severity "critical" }}
|
||||
🚨 CRITICAL 🚨 {{ end }}
|
||||
{{- if eq .Labels.severity "warning" }}
|
||||
⚠️ WARNING ⚠️{{ end }}
|
||||
{{- if .Annotations.summary }}
|
||||
📝 {{ .Annotations.summary | html }}{{ end }}
|
||||
{{- if .Annotations.description }}
|
||||
📖 {{ .Annotations.description | html }}{{ end }}
|
||||
|
||||
🏷 Labels:
|
||||
{{ range .Labels.SortedPairs }} <i>{{ .Name | html }}</i>: <code>{{ .Value | html }}</code>
|
||||
{{ end }}{{ end }}
|
||||
🛠 <a href="https://grafana.procopius.dk">Grafana</a>
|
||||
💊 <a href="https://alertmanager.procopius.dk">Alertmanager</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