Hello everyone,
I will wish to put the index information search query slowlog exclusively in log index_search_slowlog.log. However, I have the same information in 2 logs.
example:
==> elasticsearch_preprod_2_index_search_slowlog.log <== [2016-03-24 15:49:50,066][TRACE][index.search.slowlog.query] took[934.5ms], took_millis[934], types[1], stats[], search_type[QUERY_THEN_FETCH], total_shards[5], source[{"from":0,"size":1,"sort":[{"_geo_distance":{"geoloc":{"lat":49.734,"lon":2.578},"order":"asc","unit":"km"}}],"fields":["_id","_type","_index","nom_fr"],"query":{"filtered":{"query":[{"match_all":{}}],"filter":{"geo_distance":{"distance":"500km","geoloc":{"lat":49.734,"lon":2.578}}}}}}], extra_source[],
==> elasticsearch_preprod_2.log <== [2016-03-24 15:49:50,066][TRACE][index.search.slowlog.query] took[934.5ms], took_millis[934], types[1], stats[], search_type[QUERY_THEN_FETCH], total_shards[5], source[{"from":0,"size":1,"sort":[{"_geo_distance":{"geoloc":{"lat":49.734,"lon":2.578},"order":"asc","unit":"km"}}],"fields":["_id","_type","_index","nom_fr"],"query":{"filtered":{"query":[{"match_all":{}}],"filter":{"geo_distance":{"distance":"500km","geoloc":{"lat":49.734,"lon":2.578}}}}}}], extra_source[],
Here is my setup:
- elasticsearch.yml
index.search.slowlog.threshold.query.warn: 3s index.search.slowlog.threshold.query.info: 2s index.search.slowlog.threshold.query.debug: 1s index.search.slowlog.threshold.query.trace: -1
index.search.slowlog.threshold.fetch.warn: 500ms index.search.slowlog.threshold.fetch.info: 250ms index.search.slowlog.threshold.fetch.debug: 100ms index.search.slowlog.threshold.fetch.trace: -1
index.indexing.slowlog.threshold.index.warn: 1s index.indexing.slowlog.threshold.index.info: 500s index.indexing.slowlog.threshold.index.debug: 250ms index.indexing.slowlog.threshold.index.trace: -1
- logging.yml
rootLogger: ${es.logger.level}, console, file logger: action: DEBUG deprecation: INFO, deprecation_log_file org.apache.http: INFO index.search.slowlog: INFO, index_search_slow_log_file index.indexing.slowlog: INFO, index_indexing_slow_log_file
additivity: index.search.slowlog: true index.indexing.slowlog: true deprecation: true
appender: console: type: console layout: type: consolePattern conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
file: type: dailyRollingFile file: ${path.logs}/${cluster.name}.log datePattern: "'.'yyyy-MM-dd" layout: type: pattern conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %.10000m%n"
deprecation_log_file: type: dailyRollingFile file: ${path.logs}/${cluster.name}_deprecation.log datePattern: "'.'yyyy-MM-dd" layout: type: pattern conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
index_search_slow_log_file: type: dailyRollingFile file: ${path.logs}/${cluster.name}_index_search_slowlog.log datePattern: "'.'yyyy-MM-dd" layout: type: pattern conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
index_indexing_slow_log_file: type: dailyRollingFile file: ${path.logs}/${cluster.name}_index_indexing_slowlog.log datePattern: "'.'yyyy-MM-dd" layout: type: pattern conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
Would you have a solution? For information I use elasticsearch 2.2.1 official package on debian 8.
Best regards.
Alexandre.