fuuko/go-neb: Notify room if alert is firing
This commit is contained in:
parent
9dbd7f9c85
commit
68fbc9e185
|
@ -26,9 +26,10 @@ in
|
|||
webhook_url = "${baseUrl}/services/hooks/YWxlcnRtYW5hZ2VyX3NlcnZpY2U";
|
||||
rooms = {
|
||||
"!ceigaGYfREXXSeLFiH:sbruder.de" = {
|
||||
text_template = "{{ range .Alerts }}[{{ .Status }}] {{ index .Labels \"alertname\" }}: {{ index .Annotations \"description\" }}\n{{ end }}";
|
||||
text_template = "{{ range .Alerts }}{{ if eq .Status \"firing\" }}@room {{ end }}[{{ .Status }}] {{ index .Labels \"alertname\" }}: {{ index .Annotations \"description\" }}\n{{ end }}";
|
||||
html_template = ''
|
||||
{{ range .Alerts }}
|
||||
{{- if eq .Status "firing" }}@room {{ end -}}
|
||||
{{ $severity := index .Labels "severity" }}
|
||||
<font{{ if eq .Status "firing" -}}
|
||||
{{- if eq $severity "critical" }} color="red"
|
||||
|
|
Loading…
Reference in a new issue