Clone filter does not work if only add_field option is used

Description

Having following configuration

And passing a line on stdin gives only the same line on output with added @timestamp and @version while the desired state field is missing. This is

Stdin:

Stdout:

If I extend clone configuration with

I get correctly 2 events with the field state added to the clone and type also.

Gliffy Diagrams

Activity

Show:

Martin Hynar April 28, 2014 at 11:05 AM

Oh, now I understand. Thanks!

Philippe Weber April 28, 2014 at 10:01 AM

I understood correctly, but still this is the behaviour of the clone filter:

A new clone will be created with the given type for each type in this list.

So as you don't specify a list in clones is default to an empty list and thus do NOT create any clones

Martin Hynar April 28, 2014 at 8:58 AM

I made the output bit confusing. The configuration without clones gives only one event on the stdout. There is no cloned event with the field I want to add.

Philippe Weber April 25, 2014 at 10:51 AM

It is the default behaviour of this filter as documented,

The original event is left unchanged.

the additional add_field, add_tag are applied to the cloned event only.
normally, you would use further filters to be applied to either the clone or the event.
However be aware of the current issue as documented in linked issues.

Won't Fix

Details

Assignee

Reporter

Affects versions

Created April 25, 2014 at 8:44 AM
Updated April 28, 2014 at 11:10 AM
Resolved April 28, 2014 at 11:10 AM