Kibana: How to get the Elasticsearch query forged by Kibana

Created on 16 Jul 2014  路  19Comments  路  Source: elastic/kibana

Hi,

I am seeking how to get the Elasticsearch query forged by Kibana with the interface. May be there is a javascript function used to create the query, or a variable where the query is saved?

For example when a dashboard is created with its different search parameters, a query is sent to elasticsearch. I would to know if it is possible to get this query with javascript function or variable.

Thank you for your time and consideration.
Ronan

Most helpful comment

@mikee805 hopefully you found the little caret at the bottom of visualizations, which shows more information about how the data was fetched.

untitled-1

All 19 comments

Hi,

Once you created your Kibana searches, go to the "DOCUMENTS" panel where you see the results and then click on the "i" on the top right of this panel.
Here, you will see appear what you are looking: a window with the elasticsearch query named "Last Elasticsearch Query".

Regards,
SD

Thank you.
I have noticed a little bug with this option. The "i" disappears when a scripting dashboard (script/dashboard.js) is used (with options in url...).

Thanks for your help @stigdescamps

Is there away to do this in Kibana 4 ?

Thanks,
Mike

@mikee805 hopefully you found the little caret at the bottom of visualizations, which shows more information about how the data was fetched.

untitled-1

@spalger :trophy: perfect explanation.

@spalger Thanks that's exactly what i needed maybe we can get some hover text on the carrot, please?

What about Kibana 5 (5.4)? I can't find any documentation on this.

@jansegre I found this for Kibana 5. It's very similar to what @spalger said, except it looks slightly different:
kibana5-carat-request

Hit the little grey caret at the bottom left, then select Request.

How to do it if index does not contain time-based events?
I do not have any visualisation on Discover page, just query results.
Kibana 5.4.

I don't see a way to do this in the current version - in terms of how to see the query that was sent to elasticsearch to get the results:
image

Works perfectly for Discover page, but does anyone know how about Timelion page? Is there a possibility to see its queries? Thanks !

I'm also interested in finding the queries generated by a Timelion visualization!

Was this functionality removed from Discover? There's no caret anymore.

Can't find caret, too. Using Kibana Version: 6.4.2

In Kibana 6.5.0, from the Discover and Visualize pages, you can get the underlying query by clicking on Inspect button on the top-right:

Screen Shot 2019-03-29 at 4 52 18 PM

and then navigating to View: Requests > Request tab on the pane that pops up on the right:

Screen Shot 2019-03-29 at 4 53 01 PM

and scrolling down to find the query.

Hey,how to get query for the visualize type is Visual Builder in kibana 6.6X

I don't have the "inspect" button in 6.4.2

How do I get that?

I had to go into Management -> Saved Objects
objects

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timroes picture timroes  路  3Comments

stacey-gammon picture stacey-gammon  路  3Comments

MaartenUreel picture MaartenUreel  路  3Comments

cafuego picture cafuego  路  3Comments

tbragin picture tbragin  路  3Comments