Use of [@metadata] in logstash 2.0


(Philip Pum) #1

I read about the use of the [@metadata] field in the 1.5 version (https://www.elastic.co/blog/logstash-metadata) and wanted to try it out on logstash 2.0. Unfortunately, there seems to be no way of forcing to output metadata fields in the output{} filters.

Is the the use of [@metadata] still recommended in version 2.0 or is it deprecated?


(Magnus B├Ąck) #2

Unfortunately, there seems to be no way of forcing to output metadata fields in the output{} filters.

The rubydebug codec has an option to include @metadata. That the outputs ignore that field is the whole point.

Is the the use of [@metadata] still recommended in version 2.0 or is it deprecated?

It's not deprecated.


(Aaron Mildenstein) #3

As @magnusbaeck has pointed out, @metadata was designed specifically to not output. You can copy anything out of @metadata with mutate and sprintf formatting, as appropriate.


(system) #4