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

Fix filebeat to perseve log.level in event from json reader #15562

Closed
wants to merge 1 commit into from

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Jan 15, 2020

Fix filebeat to perserve log.level in event from json reader.

Closes #12040

@blakerouse blakerouse requested a review from urso January 15, 2020 01:09
// event keys are not overwritten, but any nesting of map values is still added to the event.
fields := common.MapStr(keys)
fields.DeepUpdate(event.Fields)
event.Fields.Update(fields)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the @timestamp and @metadata keys are special and must not be written to event.Fields.

Is this change enough? If overwriteKeys is true the default in case on the switch statement still uses event.Fields[k] = v, but might instead require a deep update (if k is a map).

@blakerouse blakerouse changed the title Fix filebeat to perseve log.level in event from json reader. Fixes #12040. Fix filebeat to perseve log.level in event from json reader Jan 21, 2020
@andresrc andresrc added Team:Services (Deprecated) Label for the former Integrations-Services team Filebeat Filebeat [zube]: Inbox [zube]: In Review and removed [zube]: Inbox labels Jan 28, 2020
@krishansaini92
Copy link

krishansaini92 commented Aug 19, 2020

Need this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Filebeat Filebeat Team:Services (Deprecated) Label for the former Integrations-Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filebeat does not preserve log.level field of the event
4 participants