Skip to content
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

Add jsonhelper #3280

Merged
merged 4 commits into from
Jan 6, 2017
Merged

Add jsonhelper #3280

merged 4 commits into from
Jan 6, 2017

Conversation

martinscholz83
Copy link
Contributor

Helper lib to write json keys for an event. Also refactored #3169

@elasticmachine
Copy link
Collaborator

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run.

1 similar comment
@elasticmachine
Copy link
Collaborator

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run.

@martinscholz83
Copy link
Contributor Author

martinscholz83 commented Jan 4, 2017

@ruflin, @andrewkroh Is there something more to do after creating a new package??

@martinscholz83
Copy link
Contributor Author

Why i had to create a directory which has the same name like the go file to get this working??

@martinscholz83
Copy link
Contributor Author

After chatting with @tsg, we decided to put helper into jsontransform.

@andrewkroh
Copy link
Member

@maddin2016 Can you please add when to the list of allowed fields for the processor. Found it while testing.

Otherwise LGTM.

@martinscholz83
Copy link
Contributor Author

Hi @andrewkroh, what when does mean?

@andrewkroh
Copy link
Member

It's a conditional statement like:

processors:
- decode_json_fields:
    when.regexp:
      message: '^{'
    fields: message
    target: ''
- drop_fields:
    when.regexp:
      message: '^{'
    fields: message

@martinscholz83
Copy link
Contributor Author

Ok, i asked because i don't find it at source code.

@andrewkroh andrewkroh merged commit d1fe6ef into elastic:master Jan 6, 2017
@andrewkroh andrewkroh added :Processors enhancement Filebeat Filebeat libbeat needs_backport PR is waiting to be backported to other branches. refactoring bug labels Jan 6, 2017
@andrewkroh
Copy link
Member

This needs to be back ported to 5.2 to get the bug fix for the missing when condition.

@martinscholz83 martinscholz83 mentioned this pull request Jan 6, 2017
andrewkroh pushed a commit that referenced this pull request Jan 7, 2017
WriteJSONKeys reduces code duplication between the Filebeat json parser and the decode_json_fields processor.

Fixed bug with decode_json_fields where the `when` condition was not allowed.
@andrewkroh andrewkroh removed the needs_backport PR is waiting to be backported to other branches. label Jan 31, 2017
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
WriteJSONKeys reduces code duplication between the Filebeat json parser and the decode_json_fields processor.

Fixed bug with decode_json_fields where the `when` condition was not allowed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants