Logstash Elastic Input Plugin Does Not Write @metadata

(Yoram Kornatzky) #1

Logstash 5.5
Elastic Search input plugin
docinfo is true
But no @metadata field in output. What could be the problem
Here is the Logstash conf file:
input {
elasticsearch {
hosts => "localhost:9200"
index => "first"
query => { "query": { "match_all": {}}}
docinfo => true
docinfo_fields => ["_index", "_type", "_id"]
docinfo_target=> "@metadata"

output {
stdout {
codec => json

(Magnus B├Ąck) #2

The only case when the @metadata contents is included is if you use the rubydebug codec and set it's metadata option to true, e.g. like this:

stdout { codec => rubydebug { metadata => true } }

The whole point of @metadata is that its content is not included in the event payload sent to outputs.

(Yoram Kornatzky) #3

Thanks. Working

(system) #4

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