You might find a prune filter helpful for removing top-level fields (you can either whitelist fields to keep or blacklist fields to remove). mutate can also remove fields, and in the worst case you can resort to ruby.
What do you mean by plain text? A plain codec by default will emit the timestamp, hostname, and contents of [message]. You can tell it to use a different format. If you really only do want a handful of fields you could supply the list of fields in the format option of the codec and not bother pruning the rest.
codec => plain { format => "foo is %{foo}. bar is %{bar}" } }
Thank you, @Badger
I was able to build on what you posted to fine tune something that was relevant.
One last question to avoid making a new thread. Is there any way to have the full output sent off to another destination or would that require a separate conf file ?
Not sure I understand the question. You can have multiple outputs in a configuration. But you clearly know that, since you have two outputs in your existing configuration.
You can do that using pipeline to pipeline communications with a forked path pattern.
If you are running on an old version you can do it by using a clone filter, then making the prune and output conditional upon the type set by the clone.
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.