modules/nixos/monitoring: import matrix-hook template
This commit is contained in:
parent
c4273d297d
commit
d9bb98aa79
2 changed files with 12 additions and 1 deletions
modules/nixos/monitoring
|
@ -34,7 +34,7 @@ in
|
|||
MX_HOMESERVER = "https://matrix-client.matrix.org";
|
||||
MX_ID = "@nix-community-matrix-bot:matrix.org";
|
||||
MX_ROOMID = "!cBybDCkeRlSWfuaFvn:numtide.com";
|
||||
MX_MSG_TEMPLATE = "${matrixHook}/message.html.tmpl";
|
||||
MX_MSG_TEMPLATE = "${./message.html.tmpl}";
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
|
|
11
modules/nixos/monitoring/message.html.tmpl
Normal file
11
modules/nixos/monitoring/message.html.tmpl
Normal file
|
@ -0,0 +1,11 @@
|
|||
<p>
|
||||
{{ if eq .Status "firing" }}
|
||||
🔥 <strong><font color="#ff0000">FIRING</font></strong>
|
||||
{{ else if eq .Status "resolved"}}
|
||||
✅ <strong><font color="#00ff00">RESOLVED</font></strong>
|
||||
{{ else }}
|
||||
<strong><font>{{.Status}}</font></strong> "
|
||||
{{ end }} <code>[{{.Labels.instance}}]</code> >> <b>{{.Labels.alertname}}</b>
|
||||
</br>
|
||||
{{.Annotations.description}}
|
||||
</p>
|
Loading…
Add table
Add a link
Reference in a new issue