Images not showing Up in Slack notifications with working external images

We’re running Grafana 4.3.2, and Slack notifications haven’t been including images. It is configured to use S3 against a us-east-1 bucket (e.g. ’ https://{bucket_name}’ as the bucket url), it is actually rendering and uploading the images, and they’ve been working for PagerDuty. The notifications are configured to send images, and I get the image in the test alert.

In the logs, I see (sanitized):

t=2017-06-19T23:43:52+0000 lvl=info msg=“New state change” logger=alerting.resultHandler alertId=17 newState=alerting prev state=ok
t=2017-06-19T23:43:52+0000 lvl=info msg=“Sending notifications for” logger=alerting.notifier ruleId=17 sent count=1
t=2017-06-19T23:43:52+0000 lvl=info msg=Rendering logger=png-renderer path=“dashboard-solo/db/{dashboard name}?&panelId=1”
t=2017-06-19T23:43:53+0000 lvl=info msg=uploaded logger=alerting.notifier url=https://{bucket name}{image name}.png
t=2017-06-19T23:43:53+0000 lvl=info msg=“Sending notification” logger=alerting.notifier type=slack id=4 isDefault=false
t=2017-06-19T23:43:53+0000 lvl=info msg=“Executing slack notification” logger=alerting.notifier.slack ruleId=17 notification=slack-kali

I see that there was a similar bug that was patched in 4.3.1, but as I said, we are on 4.3.2. It seems like external images are working, but they just aren’t showing up in Slack. Any ideas?

is the url https://{bucket name}{image name}.png publicly accessible?

Try including the region in the bucket url (so full url)

I fixed it. The problem was with the bucket name, or perhaps better said I was using a bucket with dots in the name, which causes SSL cert errors. I had apparently accepted the cert, so it worked in PagerDuty and places where the url was plain for me, but not Slack.

The bucket is in us-east1, so the URL I gave was correct and the full url, however, I noticed that grafana was editing the actual url in unhelpful ways… There are better/more verbose us-east-1 urls, e.g., which grafana could not parse. Also, there are valid and grafana parseable URLs that would work, but grafana edits the url actually given out; if I put “{}” in the config, which can work without the ssl issues, grafana edits it to “https://{}”. It would be nice if the bucket name, region/API endpoint, and optionally the url prefix were all potentially separate config params.