can i get elastic search query from kibana search?

Viewed 595

the kibana interface only retrieve 500 documents I want to download all data retrieved from a search our kibana version (Version: 5.4.2 ) doesn't support downloading data as CSV so I want to execute the same search query on elastic search there is a simple way to transform the kibana uri into an elastic search query?

http://XXX.XXX.XXX.com/app/kibana#/discover/450afff0-786c-11e8-9b62-1100221a2566?_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-7d,mode:quick,to:now))&_a=(columns:!(msg,req.headers.authorization),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'platform-js*',key:msg,negate:!f,value:'request%20finish'),query:(match:(msg:(query:'request%20finish',type:phrase))))),index:'platform-js*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'name:%22reporting-js_access%22%20%20AND%20req.url:(*report*%20OR%20*advertisers*)')),sort:!('@timestamp',desc)) 

into

curl -X GET "localhost:9200/_search" -H 'Content-Type: application/json' -d'
> {
>     "query": {
>         "query_string": {
>             "analyze_wildcard": true,
>             "query": "name:\"reporting-js_access\"  AND req.url:(*report* OR *advertisers*)"
>         }
>     },
>     "stored_fields": [
>         "req.headers.authorization"
>     ]
> }
> '

following @Val answer I don't have inspect options enter image description here

1 Answers

Much easier is to click on the "Inspect" button at the top right of the Discover screen and then on the "Request" tab. You'll be able to copy/paste the exact query that Kibana is sending to Elasticsearch.

enter image description here

Related