Option to choose the treatment of null fields by the JSON decoder#677
Merged
chemamartinez merged 3 commits into3.3from Jun 27, 2018
Merged
Option to choose the treatment of null fields by the JSON decoder#677chemamartinez merged 3 commits into3.3from
chemamartinez merged 3 commits into3.3from
Conversation
f112db2 to
473bfdc
Compare
bah07
approved these changes
Jun 27, 2018
0370040 to
cf9a2c1
Compare
|
If an wazuh agent is parsing a JSON log that has NULL fields, how is that handled? Can this same option be placed on the agent side? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR solves the issue #669 adding the possibility of choose how to store a null value from a JSON event. It has been added a new option when configuring decoders called
json_null_field.An example is shown using the following decoder definition:
The allowed values for this new tag are the following:
discard: this option doesn`t save the null field (is the default value). Alerts look like the following one:empty: this option adds the null field as empty.string: this was the previous behavior, it casts the null field as the "null" string.