|
|
|
@ -64,20 +64,20 @@ func (this *SlackNotifier) Notify(context *alerting.EvalContext) { |
|
|
|
|
body := map[string]interface{}{ |
|
|
|
|
"attachments": []map[string]interface{}{ |
|
|
|
|
{ |
|
|
|
|
"color": context.GetColor(), |
|
|
|
|
"color": context.GetColor(), |
|
|
|
|
"title": context.GetNotificationTitle(), |
|
|
|
|
"title_link": ruleUrl, |
|
|
|
|
"text": context.Rule.Message, |
|
|
|
|
"fields": fields, |
|
|
|
|
"image_url": context.ImagePublicUrl, |
|
|
|
|
"footer": "Grafana v" + setting.BuildVersion, |
|
|
|
|
"footer_icon": "http://grafana.org/assets/img/fav32.png", |
|
|
|
|
"ts": time.Now().Unix(), |
|
|
|
|
//"pretext": "Optional text that appears above the attachment block",
|
|
|
|
|
// "author_name": "Bobby Tables",
|
|
|
|
|
// "author_link": "http://flickr.com/bobby/",
|
|
|
|
|
// "author_icon": "http://flickr.com/icons/bobby.jpg",
|
|
|
|
|
"title": context.GetNotificationTitle(), |
|
|
|
|
"title_link": ruleUrl, |
|
|
|
|
"text": context.Rule.Message, |
|
|
|
|
"fields": fields, |
|
|
|
|
"image_url": context.ImagePublicUrl, |
|
|
|
|
// "thumb_url": "http://example.com/path/to/thumb.png",
|
|
|
|
|
"footer": "Grafana v" + setting.BuildVersion, |
|
|
|
|
"footer_icon": "http://grafana.org/assets/img/fav32.png", |
|
|
|
|
"ts": time.Now().Unix(), |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|