I'd verify that the template has been properly stored in ES (use the get index template API), then delete the index_i index, recreated it, and inspect its mappings with the get mapping API. Does the recreated index still have the wrong mappings?
Since you haven't overridden the template_name option in your elasticsearch output the template will be saved under the name "logstash", so you should issue a GET /_template/logstash request.
I uploaded template manually to elasticsearch through put command.
Yes...? And the template was applied when you created an index via the API?
So what should I specify in template/template_name in logstash elasticsearch output section?
The template_name option doesn't determine which index template is applied to the added document. It's the index pattern field in each template you should pay attention to. If you've saved templates under various names you should probably clean them up.
So, the template option should point to the path of the index template you want to store under the name given in the template_name option. It's up to you to make sure that the contents of that template (i.e. the template's index pattern) matches the indexes you're creating.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.