L
L
Lesha Kiselev2017-02-06 19:27:18
Database administration
Lesha Kiselev, 2017-02-06 19:27:18

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"

I cling to the container logs: I
docker logs -f es-node
see only the base log there. How to set up a logger so that all requests in ES get there?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lesha Kiselev, 2017-02-07
@Yakud

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 question

Ask a Question

731 491 924 answers to any question