Hello,
I have Grafana v9.4.1 and am setting up notifications with images to slack.
This is all that I have achieved so far:
There are two problems here:
- The image is attached to the reply rather than to the original message.
- I want to get rid of the text above the image.
Regarding the first problem I cannot find anything on the forums or in the documentation.
The second issue I see that there is the configuration for [unified_alerting.reserved_labels]
disabled_labels which I have set to grafana_folder,alert-group,alertname,__alert_rule_uid__.
This did not help.
What can I do to include the image in the original message and get rid of excess message body text?
Thank you
Hi! To answer your questions:
-
I’m afraid the image must be attached as a reply rather than in the original message because the Slack API does not allow bot tokens to upload images with the chat.postMessage
API. Bots use files.upload
API to upload images, but the file must be uploaded to the channel as a separate message or as a reply to the original message otherwise the image is private to the bot, and no one else can see it.
-
I’m afraid it’s not possible to remove the text from above the image, this is there so when notifications contain multiple alerts (due to grouping in the notification policy) you can match each image to its corresponding alert.
1 Like
why do we have to see images under replies with verbose labels? I had no problem with just attaching image directly but this change is really cumbersome to me.
1 Like
nevermind, I found that using incoming webhook can workaround this issue