-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Dissect: Support trimming captured values and other configuration options #19464
Conversation
fcd9f2e
to
b340e99
Compare
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
--------------------- >> end captured stdout << ---------------------- Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
Pinging @elastic/siem (Team:SIEM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- `right`: values are trimmed on the right (trailing). | ||
- `all`: values are trimmed for leading and trailing. | ||
|
||
`trim_chars`:: (Optional) Set of characters to trim from values, when trimming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if this value was a list of characters or a string or characters. Either stating the data type or including an example would help.
b340e99
to
e15068a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @sayden |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI errors look unrelated too
rebased hoping to pass CI |
Jenkins, run tests please |
1 similar comment
Jenkins, run tests please |
Test failures unrelated |
…ions (elastic#19464) This adds 4 new configuration parameters for the dissect processor: - ignore_failure, so that it doesn't return an error when the tokenizer doesn't match the input. This is useful for chaining multiple processors together. - overwrite_keys, so that existing keys are overwritten if they already exist. - trim_values, to enable trimming blank space (left,(leading) right(trailing) or all) in captured values. - trim_chars is the set of characters that are trimmed by the above option (default is the ascii space character). The default values for these new flags have been chosen so that the default behavior of the processor is unchanged. (cherry picked from commit a57e390)
…ions (#19464) (#19685) This adds 4 new configuration parameters for the dissect processor: - ignore_failure, so that it doesn't return an error when the tokenizer doesn't match the input. This is useful for chaining multiple processors together. - overwrite_keys, so that existing keys are overwritten if they already exist. - trim_values, to enable trimming blank space (left,(leading) right(trailing) or all) in captured values. - trim_chars is the set of characters that are trimmed by the above option (default is the ascii space character). The default values for these new flags have been chosen so that the default behavior of the processor is unchanged. (cherry picked from commit a57e390)
…ions (elastic#19464) This adds 4 new configuration parameters for the dissect processor: - ignore_failure, so that it doesn't return an error when the tokenizer doesn't match the input. This is useful for chaining multiple processors together. - overwrite_keys, so that existing keys are overwritten if they already exist. - trim_values, to enable trimming blank space (left,(leading) right(trailing) or all) in captured values. - trim_chars is the set of characters that are trimmed by the above option (default is the ascii space character). The default values for these new flags have been chosen so that the default behavior of the processor is unchanged.
What does this PR do?
This adds 4 new configuration parameters for the dissect processor:
ignore_failure
, so that it doesn't return an error when the tokenizer doesn't match the input. This is useful for chaining multiple processors together.overwrite_keys
, so that existing keys are overwritten if they already exist.trim_values
, to enable trimming blank space (left
,(leading)right
(trailing) orall
) in captured values.trim_chars
is the set of characters that are trimmed by the above option (default is the ascii space character).The default values for these new flags have been chosen so that the default behavior of the processor is unchanged.
Why is it important?
These new flags are necessary to make dissect more useful and easy to use when used in chains of processors, for example a cascade of processors when only one of them is expected to match the input.
Checklist
I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.