Json_encode filter plugin v3.0.1

Getting Help

For questions about the plugin, open a topic in the Discuss forums. For bugs or feature requests, open an issue in Github.
For the list of Elastic supported plugins, please consult the Elastic Support Matrix.

Description

JSON encode filter. Takes a field and serializes it into JSON

If no target is specified, the source field is overwritten with the JSON
text.

For example, if you have a field named foo, and you want to store the
JSON encoded string in bar, do this:

filter {
json_encode {
source => "foo"
target => "bar"
}
}

Json_encode Filter Configuration Options

This plugin supports the following configuration options plus the Common Options described later.

If the event has field "somefield" == "hello" this filter, on success,
would add field foo_hello if it is present, with the
value above and the %{host} piece replaced with that value from the
event. The second example would also add a hardcoded field.

id

Add a unique ID to the plugin configuration. If no ID is specified, Logstash will generate one.
It is strongly recommended to set this ID in your configuration. This is particularly useful
when you have two or more plugins of the same type, for example, if you have 2 json_encode filters.
Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.