Handling Multiple Templates in Logstash

(Suganthi Thangavel) #1

I have two different csv files with few columns having same name but different data types and i created different templates. How to handle both templates in one conf file.
Please help me.

(Aaron Mildenstein) #2

You have a few options.

You could have two outputs with the flows separated by conditionals. Each output defines its own template.

Or you could just use the REST API to upload your other template: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html#indices-templates

(Suganthi Thangavel) #3

Thank you so much for the reply. I will try that option

(Suganthi Thangavel) #4

I tried the above solution and it works. Thank you so much Aaron :smile:

(system) #5