+
diff --git a/pkg/services/alerting/notifiers/email.go b/pkg/services/alerting/notifiers/email.go
index 913d1262a6e..fb2af7fa47a 100644
--- a/pkg/services/alerting/notifiers/email.go
+++ b/pkg/services/alerting/notifiers/email.go
@@ -55,9 +55,11 @@ func (this *EmailNotifier) Notify(context *alerting.EvalContext) {
"Name": context.Rule.Name,
"Severity": context.Rule.Severity,
"SeverityColor": context.GetColor(),
+ "Message": context.Rule.Message,
"RuleUrl": ruleUrl,
"ImageLink": context.ImagePublicUrl,
"AlertPageUrl": setting.AppUrl + "alerting",
+ "Events": context.Events,
},
To: this.Addresses,
Template: "alert_notification.html",
diff --git a/pkg/services/notifications/send_email_integration_test.go b/pkg/services/notifications/send_email_integration_test.go
index fdde2f5d4b2..b91cc178240 100644
--- a/pkg/services/notifications/send_email_integration_test.go
+++ b/pkg/services/notifications/send_email_integration_test.go
@@ -34,12 +34,22 @@ func TestEmailIntegrationTest(t *testing.T) {
"Title": "[CRITICAL] Imaginary timeserie alert",
"State": "Firing",
"Name": "Imaginary timeserie alert",
- "Severity": "Critical",
+ "Severity": "ok",
+ "SeverityColor": "#D63232",
"Message": "Alert message that will support markdown in some distant future.",
"RuleUrl": "http://localhost:3000/dashboard/db/graphite-dashboard",
- "AlertPageUrl": "http://localhost:3000/alerting",
"ImageLink": "http://localhost:3000/render/dashboard-solo/db/graphite-dashboard?panelId=1&from=1471008499616&to=1471012099617&width=1000&height=500",
- "SeverityColor": "#D63232",
+ "AlertPageUrl": "http://localhost:3000/alerting",
+ "Events": []map[string]string{
+ {
+ "Metric": "desktop",
+ "Value": "40",
+ },
+ {
+ "Metric": "mobile",
+ "Value": "20",
+ },
+ },
},
To: []string{"asdf@asdf.com "},
Template: "alert_notification.html",
diff --git a/public/emails/alert_notification.html b/public/emails/alert_notification.html
index fccd0559500..75e1e21a9c3 100644
--- a/public/emails/alert_notification.html
+++ b/public/emails/alert_notification.html
@@ -121,7 +121,7 @@ color: #FFFFFF !important;
- {{.Title}}
+ {{.Title}}
|
@@ -135,12 +135,46 @@ color: #FFFFFF !important;
- {{.Message}}
+ {{.Message}}
|
|
+
+
+{{if ne .State "ok" }}
+
+
+
+
+
+
+
+ Metric name
+ |
+
+ Value
+ |
+
+ {{range .Events}}
+
+
+ {{.Metric}}
+ |
+
+ {{.Value}}
+ |
+
+ {{end}}
+
+
+ |
+
+
+{{end}}
+
+
@@ -154,6 +188,7 @@ color: #FFFFFF !important;
+
| |