Append username in the slowlog in Elasticsearch 2.4.1?

Hi,

Question 1:

I need to know the name of the user who is sending the queries to my elasticsearch Cluster ? Is it possible?

Usual format:

[2017-01-13 12:58:09,843][WARN ][index.search.slowlog.query] [Spectra] [testindex-stats][2] took[15.3ms], took_millis[15], types[], stats[], search_type[QUERY_THEN_FETCH], total_shards[5], source[{"query":{"match":{"text":"ronin"}}}], extra_source[],

Expectation:

[2017-01-13 12:58:09,843][username][WARN ][index.search.slowlog.query] [Spectra] [testindex-stats][2] took[15.3ms], took_millis[15], types[], stats[], search_type[QUERY_THEN_FETCH], total_shards[5], source[{"query":{"match":{"text":"ronin"}}}], extra_source[],

If it is possible where i have to configure that?

Question 2:

Slowlog can be configured at per-index not at cluster level. To enable it every time i have to specify a index and enable it .
There is one way where i can hardcode in elasticsearch.yml file so that all the coming indices will have slowlogs enabled but the drawback is for doing update i have to restart all the nodes which is not good?

Is there any other way?

Thanks

Is it not possible.

I don't think so, I haven't seen anything?

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