-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add image/chart support to actions #49908
Comments
Pinging @elastic/kibana-stack-services (Team:Stack Services) |
I think it's certainly a "fallback" consideration that you can use the webhook action to do anything any of our other http-based actions do, with a richer interface. But of course it would be nice to directly support things like "embed this image" and have it make sense across actions - the slack and email actions could certainly directly deal with such things - the other actions (pagerduty, webhook, index, server-log) kind of obviously can't. So let's start with some basics. Is the image a bag of pixels with an image content/type that we can directly embed (somehow) in the outgoing message? Or is it a link to an image that Kibana can provide itself? Guessing the former, but the latter is conceptually simpler, as it's just an "image reference" (url) and not a bag of pixels (well, seems simpler anyway!). And long-term, we'd want both, but ... what do you want NOW-ish? |
I don't think this is needed immediately because aside from PNG reports (which you can access via URL) I don't believe we have a way to create an image from a chart. I agree the form of the image (url vs base64 encoded image or other form) is probably the key question here, as well as which set of builtin actions we'd want to target. cc @AlonaNadler who has been thinking about sharing of charts via actions. |
Looking at slack specifically, there appear to be two options:
Grafana provides both options: you can configure an external image store or use a bot integration |
We are currently working on this capability cc: @markov00 The idea is that as a user I can select a dashboard panel and send it to slack channel or message with at least a preview and URL. |
I noticed the addition of PNG export in Elastic Charts which is great and I think takes care of one of the obstacles. The other is how to do this export server side as part of the alert. Once an alert condition is detected, we'd need to generate the chart, export it, and then either upload it to slack or make it a publicly accessible URL and pass the URL to the slack action. There's likely some overlap here with our reporting infrastructure @joelgriffith @tsullivan |
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
There some some chatting on Slack re: images and actions, and Stacey mentioned the Slack |
@peterschretlen noted offline that Here's the "web api" version of Might make sense to switch from what we're currently using, the "webhook" style API, to the web api one, since we'll want that for other capabilities in the future anyway. Here's a link to the Slack SDK available for node, we're currently using |
I did a research of possibility to use EuiMarkdownEditor for adding message templates with images and chart snapshots for actions like Slack and Email. There are a few blockers which doesn't allows to use it as a template builder for action messages:
|
In addition to the previous comment about posting images to Slack, I want to extend it with the info: We have two different approaches on how to post a Slack message with an image. Both is implemented in my PR
Slack WebAPI method:
Fo doing that we will use Slack as image hoster. WARNING! It will take from 5 - 10 seconds to have the file available after upload. Step 1 - Upload image to Slack Step 2 - Create public URL Slack WebAPI method: Next you need to construct the direct image link from the link to website / permalink_public property of the file. The website link you get from https://slack-files.com/{team_id}-{file_id}-{pub_secret} https://files.slack.com/files-pri/{team_id}-{file_id}/{filename}?pub_secret={pub_secret} Step 3 - Send message Slack WebAPI method:
|
Two research related issues to this are now closed but worth looking at their comments:
|
Moving from |
Closing due to lack of activity. |
Kibana actions are mainly message/text based today. For example the slack action is backed by a webhook that has image support, but the action implementation itself only supports text via the
message
parameter.Ideally actions from Kibana could include images of charts showing alert conditions or snapshots of dashboards. This would be useful not just for alerts but for user event drive actions, e.g. clicking "share on slack" from a dashboard chart.
There is a workaround today for slack - you could use a
webhook
action directly, and get access to the full formatting options . Ideally though we could make binding to it with limited parameters likemessage
,image_url
andkibana_url
.The text was updated successfully, but these errors were encountered: