Try this there is an error in the docs...
Clean up the data stream and try again...
output {
if [@metadata][pipeline] {
elasticsearch {
hosts => "http://localhost:9200"
pipeline => "%{[@metadata][pipeline]}"
user => "elastic"
password => "password"
manage_template => false
index => "%{[@metadata][beat]}-%{[@metadata][version]}"
action => "create"
}
} else {
elasticsearch {
hosts => "http://localhost:9200"
user => "elastic"
password => "password"
manage_template => false
index => "%{[@metadata][beat]}-%{[@metadata][version]}"
action => "create"
}
}
}
I provided a bit of an explanation here...
Could not index event to Elasticsearch DataStream - #4 by stephenb and here