Skip to content

Failure when using prune on a nested field #12

@3ygun

Description

@3ygun

Issue

Pruning nested fields within whitelist_names & blacklist_names doesn't work.

Need?

I have a large amount of fields (>100) which are being processed. I want to prune down to a subset of those fields. However, the data looks as follows with a nested field having the same name as a non-nested field:

{
  ...
  "blam": "blam message",
  "bar": "bar message",
  ...
  "foo": {
     ...
    "blam": "foo blam message",
    "bar": "foo bar message",
     ...
  },
  ...
}

If I want to keep only [foo][bar] and [blam] how do I reference them while removing the rest?

Test

I have the test: {"hi":"hello","test":{"bar":"1","ble":2}}

I want to run:

input {
  stdin {
    codec => json
  }
}

filter {
  prune {
    interpolate => true
    # Lets remove test.bar!
    blacklist_names => [ "[test][bar]" ]
  }
}

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

But it fails to do anything:
prune on nested field

I don't know if it's related to this issue: Update remaining plugins with Event API

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions