Calling a search template from Kibana

Hello everybody
Is it possible to "wire up" a call/visualize a search template in Kibana?
I've defined a search template that takes a few parameters and when I call this through the API, it works great. I even wrote a small .NET client based on NEST to do the same - all good.
I thought about "wiring up" this search template in Kibana:

  • set parameters through controls
  • visualize results (even if it is just a simple table)

I just cannot figure out how this can be done. In the documentation I can't find anything relevant and searching on discuss yielded not much so far ( a few mentions that perhaps Vega is the answer but this too doesn't show how to actually call a search template).
Am I missing something obvious here?

I would much appreciate any suggestions, ideas or directions into the documentation.
Best regards.

In each kibana visualization, kibana need to control the whole query. In some cases, partial customization is provided by advanced json parameters.

As search template provide any form of query (including aggregation), it is not obvious how to merge the query from search template and Kibana's original query. I suppose it is even difficult to define the specification.

It is also difficult to call search template in vega/vega-lite as well. Only query json itself is supported in the data.url element in vega.

The only way could be use vega-lite parameter binding and write a query similar to the search template in vega script using the binded parameter.

++ I'm not aware of any way to do this today. we do have enhancements we're tracking for variables in Kibana Kibana: Define variables, e.g. for offset for timelion and Visual Timeseries Builder via GUI · Issue #33927 · elastic/kibana · GitHub

1 Like

Thank you for this, I've upvoted the issue.

Thank you for your insights.
The last paragraph, using vega-lite parameter binding, sounds interesting, I'll try it out.

1 Like

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