I use flume with Elasticsearch sink to insert events in Elasticsearch, and i would like to use this pattern for index name : prefix-YYYY.MM.DD
I tried to customize the index name in my config file, like this :
agent_es.sinks.es_dest.indexNameBuilder.dateFormat = yyyy.MM.dd
But it does not change index name used.
As I tryed to debug flume code, I found this in class org.apache.flume.sink.elasticsearch.ElasticSearchSink, at line 316:
It seems that wrong context is used, and following code would work better :