Open TomonoriSoejima opened 4 years ago
1. Run the request from Kibana with the profile parameter. Example
profile
GET /twitter/_search { "profile": true, "query" : { "match" : { "message" : "some number" } } }
Details : https://www.elastic.co/guide/en/elasticsearch/reference/current/search-profile.html#search-profile-api-example
2. capture the response
3. Copy the response into the left pane of Search Profiler in Kibana UI
Details: https://www.elastic.co/guide/en/kibana/current/xpack-profiler.html
In the right pane, you will get a summary of the analysis.
If you run into any errors, you may want to sanitize it first with tools like kibana2json.
Note that response from msearch can not be inserted straight into the pane as the UI currently is limited to parsing a response from a single request.
Thus you will need to break the response into an individual response.
Let's say you saved the response in raw.response.json You can extract the first response like this.
kibana2json < raw.response.json | jq -r .responses[0]
1. Run the request from Kibana with the
profile
parameter. ExampleDetails : https://www.elastic.co/guide/en/elasticsearch/reference/current/search-profile.html#search-profile-api-example
2. capture the response
3. Copy the response into the left pane of Search Profiler in Kibana UI
Details: https://www.elastic.co/guide/en/kibana/current/xpack-profiler.html
In the right pane, you will get a summary of the analysis.
If you run into any errors, you may want to sanitize it first with tools like kibana2json.
Special handling for msearch response
Note that response from msearch can not be inserted straight into the pane as the UI currently is limited to parsing a response from a single request.
Thus you will need to break the response into an individual response.
Let's say you saved the response in raw.response.json You can extract the first response like this.
kibana2json < raw.response.json | jq -r .responses[0]