From 81d3ab37c372642ebf151d05378663d9402974f3 Mon Sep 17 00:00:00 2001 From: Joseph Weigl Date: Thu, 24 Aug 2017 14:52:23 +0200 Subject: [PATCH] Add thumbnail to card --- pkg/services/alerting/notifiers/hipchat.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/services/alerting/notifiers/hipchat.go b/pkg/services/alerting/notifiers/hipchat.go index 03176c64729..757120db25b 100644 --- a/pkg/services/alerting/notifiers/hipchat.go +++ b/pkg/services/alerting/notifiers/hipchat.go @@ -134,6 +134,14 @@ func (this *HipChatNotifier) Notify(evalContext *alerting.EvalContext) error { "date": evalContext.EndTime.Unix(), "attributes": attributes, } + if len(evalContext.ImagePublicUrl) > 0 { + card["thumbnail"] = map[string]interface{}{ + "url": evalContext.ImagePublicUrl, + "url@2x": evalContext.ImagePublicUrl, + "width": 1193, + "height": 564, + } + } body := map[string]interface{}{ "message": message,