fluentbit-containerd-cri-o-json-log
fluentbit-containerd-cri-o-json-log copied to clipboard
Workaround to get Merge_Log working with native cri parser
The current custom cri parser stores app logs with some log info (timestamp, log type...) plus the json log. This is a problem for Merge_Log, which only works when the "log" field contains only json format log. The native cri parser stores the json log in a valid way, the problem is that it's stored in the "message" field, and now the problem is that is that Merge_Log only parses the log field.
References: https://github.com/microsoft/fluentbit-containerd-cri-o-json-log/issues/4
Yeah, this works for me too (I didn't understand I was using the default cri parser tho)
I think youre missing the section under INPUT don't you?
What do you mean?
There is no need to change the INPUT section, since this setting in the current INPUT:
Parser cri
is using the fluent-bit native cri parser.
but then you dont use the cri-log parser because its never referenced?
Yes, you are right. I left that unused custom parser there for future reference, since this PR is a workaround for a fluent-bit bad implementation of Merge_log
. But It could be perfectly removed from the configuration.