How to view elasticsearch debug logs?

I need to see some logs about every http request that's coming in to Elasticsearch.
I am using the ECK operator 1.8.0
I configured the log level to be trace for Elasticsearch but the logs from the -es-default- still dont contain logs for every http request that comes in to Elasticsearch.

How can i see the logs of the http requests coming into Elasticsearch provisioned by the eck operator?

I configured the log level to be trace

How did you proceed?

If you want all incoming HTTP requests, the Elasticsearch HTTP layer has a tracer logger which can be dynamically activated:

/_cluster/settings -XPUT -d '{
    "transient": {
        "logger.org.elasticsearch.http.HttpTracer": "TRACE"
    }
}'

Note: in the next ECK 1.9.0, we have added on the ECK operator side all HTTP requests made to Elasticsearch at the debug level (Elasticsearch HTTP client: log requests at debug level · Issue #4935 · elastic/cloud-on-k8s · GitHub).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.