Skip to content

Commit d9cbefc

Browse files
[DOC] Troubleshooting Expensive Searches (elastic#92725)
* [DOC] Troubleshooting Expensive Searches 👋 re: elastic#73222 adds in content so we can link to users on how to find source of expensive searches. * Several edits * Apply suggestions from code review Co-authored-by: Abdon Pijpelink <[email protected]> Co-authored-by: Abdon Pijpelink <[email protected]>
1 parent 854bfa6 commit d9cbefc

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

docs/reference/troubleshooting/troubleshooting-searches.asciidoc

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,4 +297,25 @@ used by the data stream.
297297
For static settings, you need to create a new index with the correct settings.
298298
Next, you can reindex the data into that index. For data streams, refer to
299299
<<change-static-index-setting-for-a-data-stream,Change a static index setting
300-
for a data stream>>.
300+
for a data stream>>.
301+
302+
[discrete]
303+
[[troubleshooting-slow-searches]]
304+
=== Find slow queries
305+
306+
<<index-modules-slowlog,Slow logs>> can help pinpoint slow performing search
307+
requests. Enabling <<auditing-settings,audit logging>> on top can help determine
308+
query source. Add the following settings to the `elasticsearch.yml` configuration file
309+
to trace queries. The resulting logging is verbose, so disable these settings when not
310+
troubleshooting.
311+
312+
[source,yaml]
313+
----
314+
xpack.security.audit.enabled: true
315+
xpack.security.audit.logfile.events.include: _all
316+
xpack.security.audit.logfile.events.emit_request_body: true
317+
----
318+
319+
Refer to
320+
https://www.elastic.co/blog/advanced-tuning-finding-and-fixing-slow-elasticsearch-queries[Advanced
321+
tuning: finding and fixing slow Elasticsearch queries] for more information.

0 commit comments

Comments
 (0)