Created
October 12, 2021 00:54
-
-
Save andycmaj/54f2a290fe60bb6d868af25a7f9b5bf4 to your computer and use it in GitHub Desktop.
fluentd filter config for parsing nested json log messages in k8s-plugin-enriched entries
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
# Fixes parsing nested json in the docker json logs | |
<filter kubernetes.**> | |
@id filter_parser | |
@type parser | |
key_name log | |
reserve_data false | |
remove_key_name_field true | |
# use parent @timestamp if can't parse a time field | |
replace_invalid_sequence true | |
reserve_time true | |
# prefix parsed nested json fields with "data." | |
inject_key_prefix data. | |
<parse> | |
@type multi_format | |
<pattern> | |
format json | |
json_parser json | |
</pattern> | |
<pattern> | |
format none | |
</pattern> | |
</parse> | |
</filter> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
investigation from: