Logstash keeps printing the below line almost every second.
Failed to query elasticsearch for previous event {:index=>"", :query=>"", :event=>#LogStash::Event:0x535f580d, :error=>"#<RuntimeError: Elasticsearch query error: [{"shard"=>0, "index"=>".logstash", "node"=>"Az0RWz6mSfuY9lvDctkagg", "reason"=>{"type"=>"query_shard_exception", "reason"=>"No mapping found for [@timestamp] in order to sort on", "index_uuid"=>"F2VMpJSBTs2yVLbvWs7juQ", "index"=>".logstash"}}]>"}
That fetches all documents from logstash-* indexes and sorts them using @timestamp. One or more of those indexes does not have a @timestamp field. The error message says the index in question is "index"=>".logstash", which does not match logstash-*. Are you sure that is the configuration you are running?
Also it makes no sense that you have both an elasticsearch input and an elasticsearch filter that query everything.
If you just want to read in data from beats you can remove the elasticsearch input and filter.
You will still need to tell the elasticsearch output which index to write to. If you want it to set it using that metadata field you would use this option on the output
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.