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

[Filebeat] Make it configurable if an error should be logged if json parsing fails, also change the log level of the error to warn #6047

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@felipejfc

felipejfc commented Jan 11, 2018

Fixes #6045

[Filebeat] Make it configurable if an error should be logged if json …
…parsing fails, also change the log level of the error to warn
@elasticmachine

This comment has been minimized.

Show comment
Hide comment
@elasticmachine

elasticmachine Jan 11, 2018

Can one of the admins verify this patch?

elasticmachine commented Jan 11, 2018

Can one of the admins verify this patch?

@ruflin

This comment has been minimized.

Show comment
Hide comment
@ruflin

ruflin Jan 11, 2018

Collaborator

@felipejfc Thanks for the PR. Lets discuss a bit more details in #6045 to see if there are some other solutions.

Collaborator

ruflin commented Jan 11, 2018

@felipejfc Thanks for the PR. Lets discuss a bit more details in #6045 to see if there are some other solutions.

@ruflin

If we move forward with this PR, it needs some tests to validate the functionality.

Can you also add a CHANGELOG entry?

@@ -29,7 +29,9 @@ func (r *JSON) decodeJSON(text []byte) ([]byte, common.MapStr) {
err := unmarshal(text, &jsonFields)
if err != nil || jsonFields == nil {
logp.Err("Error decoding JSON: %v", err)
if r.cfg.LogParseErrors {
logp.Warn("Error decoding JSON: %v", err)

This comment has been minimized.

@ruflin

ruflin Jan 16, 2018

Collaborator

This should still be an Err log message.

@ruflin

ruflin Jan 16, 2018

Collaborator

This should still be an Err log message.

KeysUnderRoot bool `config:"keys_under_root"`
OverwriteKeys bool `config:"overwrite_keys"`
AddErrorKey bool `config:"add_error_key"`
LogParseErrors bool `config:"log_parse_errors"`

This comment has been minimized.

@ruflin

ruflin Jan 16, 2018

Collaborator

Default bool value is false. So this would be enable by default which would be a change in behaviour I think.

@ruflin

ruflin Jan 16, 2018

Collaborator

Default bool value is false. So this would be enable by default which would be a change in behaviour I think.

@ruflin

This comment has been minimized.

Show comment
Hide comment
@ruflin

ruflin Feb 27, 2018

Collaborator

@felipejfc Any updates from your side?

Collaborator

ruflin commented Feb 27, 2018

@felipejfc Any updates from your side?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment