diff --git a/system/go-neb.nix b/system/go-neb.nix index 3aabf475..82bd0803 100644 --- a/system/go-neb.nix +++ b/system/go-neb.nix @@ -28,7 +28,7 @@ text_template = '' {{range .Alerts -}} [{{ .Status }}] {{index .Labels "alertname" }}: {{index .Annotations "description"}} {{ end -}}''; html_template = '' - {{range .Alerts -}}{{ $severity := index .Labels "severity" }}{{ if eq .Status "firing" }}{{ if eq $severity "critical"}}[FIRING - CRITICAL]{{ else if eq $severity "warning"}}[FIRING - WARNING]{{ else }}[FIRING - {{ $severity }}]{{ end }}{{ else }}[RESOLVED]{{ end }} {{ index .Annotations "description"}} {{ $url := index .Labels "url" }}{{ if eq $url "" }}{{ else }}more infos {{ end }}({{ index .Labels "alertname"}}, dashboard, silence)
{{end -}} + {{range .Alerts -}}{{ $severity := index .Labels "severity" }}{{ if eq .Status "firing" }}{{ if eq $severity "critical"}}[FIRING - CRITICAL]{{ else if eq $severity "warning"}}[FIRING - WARNING]{{ else }}[FIRING - {{ $severity }}]{{ end }}{{ else }}[RESOLVED]{{ end }} {{ index .Annotations "description"}} {{ $url := index .Labels "url" }}{{ if eq $url "" }}{{ else }}more infos {{ end }}({{ index .Labels "alertname"}}, source, silence)
{{end -}} ''; msg_type = "m.text"; # Must be either `m.text` or `m.notice` }; diff --git a/system/modules/go-neb.nix b/system/modules/go-neb.nix index d2c27b1b..1de5f906 100644 --- a/system/modules/go-neb.nix +++ b/system/modules/go-neb.nix @@ -2,8 +2,6 @@ with lib; -# TODO: Replace by upstreamed module - let cfg = config.services.go-neb;