-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: [ and ] in field names still cause parse failures #14821
Comments
🤔 #14044 solved the ability to create events verbatim as-structured, or to set fields whose values are key/value maps containing invalid field references, but the Event API's methods ( If the JSON filter is configured with a At first glance, I cannot think of a way to make the existing Event API's accessor methods — which require valid field references — to work with top-level fields that are not valid field references, and therefore cannot think of a way for filters like the JSON filter to set top-level fields with invalid field references. The Event API does have an |
Would a suitable workaround be to use the codec to parse into a target, and then use a ruby filter to copy everything from there into the root? Or would the ruby filter hit all the same API issues, just a step later? In a similar vein, could/should the filters always go via a target, but if none was specified use a default one and copy the contents to root afterward? Or, is the correct fix a new (or changes to an existing) API call in logstash? I'm a long way out of my depth here - will help where I can, but the internal logstash API is one (if not several) layers beyond me. |
Bingo. We have no generic way to set a top-level field whose name is not a valid field reference. With escapes enabled (still opt-in), assuming that we had set the parsed contents with
|
Logstash information:
OS version (
uname -a
if on a Unix-like system):Description of the problem including expected versus actual behaviour:
I raised issue 13606 around the failure of logstash to handle incoming records with embedded
[
's in field names. It was closed under PR 14044, but I tested it today with 8.5.3 and the original repro still works:The CSV filter also still exhibits parse failures:
I haven't tested any other filters.
The text was updated successfully, but these errors were encountered: