From 41171f8a5c45430f046bfb28c699f7a2569c53ac Mon Sep 17 00:00:00 2001 From: Alfred Krohmer Date: Mon, 10 Apr 2017 09:17:37 +0200 Subject: [PATCH] Add a link to a graph image in Pushover notifications (#8075) --- pkg/services/alerting/notifiers/pushover.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/services/alerting/notifiers/pushover.go b/pkg/services/alerting/notifiers/pushover.go index c68ad421c62..7a2297f9e89 100644 --- a/pkg/services/alerting/notifiers/pushover.go +++ b/pkg/services/alerting/notifiers/pushover.go @@ -139,8 +139,12 @@ func (this *PushoverNotifier) Notify(evalContext *alerting.EvalContext) error { } } if evalContext.Error != nil { - message += fmt.Sprintf("\nError message %s", evalContext.Error.Error()) + message += fmt.Sprintf("\nError message: %s", evalContext.Error.Error()) } + if evalContext.ImagePublicUrl != "" { + message += fmt.Sprintf("\nShow graph image", evalContext.ImagePublicUrl) + } + q := url.Values{} q.Add("user", this.UserKey) q.Add("token", this.ApiToken)