elastic / elastic/logstash

Unable to access fields with [ ] characters in ruby filter

Open
#6,736 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

Sometimes it is useful to access fields (or nested fields) containing [ or ] characters in the name. Currently I am unable to access it even if I try to escape it.

For example I am unable to remove or set a field "myfield[with[[".
ruby {
code => "
...
event.remove(k)
....
"
}

I think event.set and event.remove should be modified to allow better access to fields, even to fields containing [ or ].

Logstash version: 5.2.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.