Answer the question
In order to leave comments, you need to log in
How to enable ElasticSearch query logging in a docker container?
There is an ElasticSearch cluster, the nodes of which are in Docker containers.
It took the ability to log all requests to the cluster.
I found the elasticsearch.yml option config I needed:
index.search.slowlog.threshold.query.debug: 0s
index.search.slowlog.threshold.fetch.debug: 0s
index.indexing.slowlog.threshold.index.debug: 0s
logging.yml:es.logger.level: INFO
rootLogger: ${es.logger.level}, console
logger:
action: DEBUG
appender:
console:
type: console
layout:
type: consolePattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
docker logs -f es-node
Answer the question
In order to leave comments, you need to log in
Found what's wrong. Logs were written inside the container. I threw logs when starting the container on the host:
docker run ... -v /var/log/elasticsearch:/usr/share/elasticsearch/logs ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question