Fetch Kibana Dashboard links from Canvas Plugin

Hi,

We are running Elasticsearch and Kibana 6.6.1 want to have a landing page as a canvas workpad that displays a set of other canvas workpads and kibana dashboards with the corresponding links. For this we need to be able to dynamically fetch the links/IDs of our kibana dashboards and canvas workpads.
For the canvas workpads we solved it by using the find() method provided by the workpadService code from canvas. We then proceed to construct the link based on the workpad-id that was fetched.

What would be the best way/API to programmatically fetch the links to standard Kibana dashboards from a canvas plugin?

Thanks in advance!

To programatically get some information / data into Canvas, the best way would be to make a new Canvas plugin (every Canvas plugin is a function) which provides a new Data Source. Your Data Source function could have a server-side implementation that queries the .kibana index, doing a terms aggregation on the type field, to get all of saved objects that you're interested in, per-type (workpad, dashboard, etc). It could also add a column to the resulting data table for the href that links to that saved object.

Then in a Canvas Workpad, you'd be able to create a new element, change the data source from demodata to my-kibana-objects and pipe that to render a Table or Markdown visualization. I think Markdown element might be best for making links clickable.

1 Like

So the way to go would be to query the .kibana index huh? I will try that, thanks a lot for your answer!

Kind regards

Thanks @tsullivan, this works like a charm:

Best regards

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.