Reputation: 89
Following on from the documentation and answers to similar questions here, I've created a Slack app with a bot user and connected it to my public channel in Slack. I've also invited the bot user and gave it files:write:user
OAuth Scope. After all this, I reinstalled the app to apply the changes.
My configuration in Grafana has:
The Send Test works fine, even in private channels. I first receive a notification from the app and then a pretty image from the bot user. From the Javascript console, my Grafana version is 5.0.3
. I've repeated this process several times with no luck. The only I can imagine is that I'm not an Admin but then I wouldn't have expected the test to work.
I've also looked through the Grafana log files and it seems to come from Grafana's side; specifically, it has trouble rendering the image.
lvl=info msg="New state change" logger=alerting.resultHandler alertId=1 newState=ok prev state=alerting
lvl=info msg=Rendering logger=png-renderer path="somepath?panelId=11111"
lvl=eror msg="failed to render an image" logger=png-renderer error="exit status 127"
lvl=info msg=uploaded logger=alerting.notifier url=
lvl=info msg="Executing slack notification" logger=alerting.notifier.slack ruleId=6 notification="myalert"
lvl=info msg="Uploading to slack via file.upload API" logger=alerting.notifier.slack
lvl=info msg="Request Completed" logger=context userId=1111 orgId=1111 uname= method=GET path=/ status=302 remote_addr=000.111.222.333 time_ms=0 size=29 referer=
Upvotes: 2
Views: 1934
Reputation: 37
Answering after long time, but I hope if this can be helpful to someone, To upload images on slack bot from Grafana, set files:write in Oauth and permission setting on app in slack setting(as stated in question than in particular channel invite your bot( try typing @botname it will automatically ask that invite bot to this channel)
Upvotes: 2
Reputation: 89
The solution was to install missing fonts, specifically libfontconfig
in Ubuntu, if you are using the tar.gz file rather than the deb file (for some reason, it doesn't include the fonts by default). As a note to future users of other distros, each one has their own requirements so be sure to check out the Grafana docs.
Upvotes: 0