lives
lives

Reputation: 1195

elastic search log configuration is not working

I tried to enable logs in the elastic search server using the below link

https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-slowlog.html

I verified my index setting using the url http://localhost:9200/_all/_settings

The result is below

{"myindex":{"settings":{"index":{"search":{"slowlog":{"threshold":{"fetch":{"warn":"1ms","trace":"1ms","debug":"1ms","info":"1ms"},"query":{"warn":"1ms","trace":"1ms","debug":"1ms","info":"1ms"}}}},"number_of_shards":"3","provided_name":"occindex","creation_date":"1508319257925","number_of_replicas":"2","uuid":"dVAWgk62Sgivzr2B_OuCzA","version":{"created":"5040399"}}}}}

As per the document, I expect the logs to be populated when the threshold is breached.

I have set 1 ms as the threshold in order to log all queries that are hitting elastic search

I observed that under logs folder , the log files elasticsearch_index_search_slowlog.log and elasticsearch.log does not show the queries which are hitting elastic search.

Let me know if my configuration is correct.

Upvotes: 0

Views: 283

Answers (1)

lives
lives

Reputation: 1195

The log worked after I inserted one record.

If you fire the query when there are no records in the index , the log was not updated

Upvotes: 0

Related Questions