Commit 1acad215 authored by ale's avatar ale

Merge branch 'alerts-email' into 'master'

prometheus: link to alerts dashboard in emails

See merge request !112
parents b79c6869 956a30a7
Pipeline #6685 passed with stage
in 3 minutes and 29 seconds
{{ define "__alertmanagerURL" }}https://alerts.[[ domain ]]/?q=%40state%3Dactive{{ end }}
{{ define "email.float.html" }}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
......@@ -313,7 +315,7 @@ a {
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="content-block">
<a href='{{ template "__alertmanagerURL" . }}' class="btn-primary">View in {{ template "__alertmanager" . }}</a>
<a href='{{ template "__alertmanagerURL" . }}' class="btn-primary">View in alerts dashboard</a>
</td>
</tr>
{{ if gt (len .Alerts.Firing) 0 }}
......@@ -370,7 +372,7 @@ a {
<div class="footer">
<table width="100%">
<tr>
<td class="aligncenter content-block"><a href='{{ .ExternalURL }}'>Sent by {{ template "__alertmanager" . }}</a></td>
<td class="aligncenter content-block"><a href="https://alerts.[[ domain ]]">Alerts dashboard</a></td>
</tr>
</table>
</div></div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment