Slow Logedit
Search Slow Logedit
Shard level slow search log allows to log slow search (query and fetch phases) into a dedicated log file.
Thresholds can be set for both the query phase of the execution, and fetch phase, here is a sample:
All of the above settings are dynamic
By default, none are enabled (set to -1
). Levels (warn
, info
, debug
, trace
) allow to control under which logging level the log will be logged. Not all are required to be configured (for example, onlywarn
threshold can be set). The benefit of several levels is the ability to quickly "grep" for specific thresholds breached.
The logging is done on the shard level scope, meaning the execution of a search request within a specific shard. It does not encompass the whole search request, which can be broadcast to several shards in order to execute. Some of the benefits of shard level logging is the association of the actual execution on the specific machine, compared with request level.
The logging file is configured by default using the following configuration (found in logging.yml
):
Index Slow logedit
The indexing slow log, similar in functionality to the search slow log. The log file name ends with _index_indexing_slowlog.log
. Log and the thresholds are configured in the elasticsearch.yml file in the same way as the search slowlog. Index slowlog sample:
All of the above settings are dynamic
By default Elasticsearch will log the first 1000 characters of the _source in the slowlog. You can change that with index.indexing.slowlog.source
. Setting it to false
or 0
will skip logging the source entirely an setting it to true
will log the entire source regardless of size.
The index slow log file is configured by default in the logging.yml
file: