Filebeat => logstash index

I configured my filebeat client as per the instructions:

I also configured logstash as per the instructions as well:

output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"

however, the indexes continue to get created as 'filebeat-*'.. I went ahead and created another template for my custom index, pretty the same as the filebeat index.

What can I do to get logstash to create an index that matches the document_type from filebeat? so far nothing that I've done seems to work.


In your example, the output.elasticsearch.index setting is using %{[@metadata][beat]}- which would map to filebeat-, metricbeat-, etc. Try changing that to %{[@metadata][type]}- or some static content that your index template is setup to match

that works! Thanks!

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