Elasticsearch: Index Delete message to be logged as INFO instead of Debug

Created on 13 Jan 2017  路  5Comments  路  Source: elastic/elasticsearch

Elasticsearch version:
5.1.0

Plugins installed: []
NA

JVM version:
1.8.111

OS version:
Ubuntu : 14

Description of the problem including expected versus actual behavior:
Index Delete message to be logged as INFO instead of DEBUG , this to be incorporated similar to what we see for index creation.

Details:

I was running an ELK cluster on prod and if someone deletes an index , I don;t see any logger in ES conf as Delete is configured as Debug level. Where as we get the Index creation message as Info.

If we talk about enabling the Debug in log4j , then it becomes too bulky to get these logs in production. So I expect debug logger level can be changed to Info from Debug in case of index deletion.

Code where we can see those messages:
Creation : https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/cluster/metadata/MetaDataCreateIndexService.java#L431

Deletion :
https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/cluster/metadata/MetaDataDeleteIndexService.java#L100

Steps to reproduce:
Assume we have log4j with debug level as INFO

Run:
1 : # delete the index
curl -XDELETE localhost:9200/test

Check elasticsearch log files at /var/log/elasticsearch/.log
You will see No logs is added specifying Index delete. Where as if you run:

1 : # Create an index
curl -XPUT localhost:9200/test/
You will see logs is added specifying Index being created.

Provide logs (if relevant):

Describe the feature:

:CorInfrLogging >enhancement good first issue

Most helpful comment

I think index deletion is such an important event that we should log it as INFO.

All 5 comments

Why not changing the level to DEBUG for org.elasticsearch.cluster.metadata.MetaDataDeleteIndexService in your LOG4J file instead?

I think index deletion is such an important event that we should log it as INFO.

Yes, that can be done and need to handled explicitly in the conf. So was just thinking if this could be made as Info as this seems to be important metrics to keep an eye on cluster.

I think index deletion is such an important event that we should log it as INFO.

+1

I think index deletion is such an important event that we should log it as INFO.

+1, we discussed this in another channel yesterday and came to the same conclusion.

Was this page helpful?
0 / 5 - 0 ratings