Create an index with log.file.path field

Hello , Is it possible to create an index in Filebeat ? My example config doesn't work :

output.elasticsearch:
  hosts: ["https://localhost:9200"]
  index: "%{[log.file.path]}"

By the way elasticsearch doesn't allow "/" char for index name. I think this is my problem. How can I parse this field and take filename ?

Hey @Burak_Cayir,

I don't think there is a way to parse the filename at this point. Is there any other field you could use?

By the way, I am curious, why would you like to use an index per file? It is usually not recommended to have many small indexes.

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