Hey folks, I'm using fluentd with k8s and using filter_parser to parse json. The problem is that the log file is not only json.
How can I remove those that don't unmatched? I saw this property
suppress_parse_error_log the documentation says: "This parameter is useful for parsing mixed logs and you want to ignore non target lines."
That's exactly what I want, how can I use it?
My configurations are:
<source>
type tail
path /var/log/containers/node-kube-*.log
pos_file /var/log/fluentd-containers.log.pos
time_format %Y-%m-%dT%H:%M:%S.%NZ
tag node-kube-*
format json
read_from_head true
</source>
<filter node-kube-**>
@type parser
key_name log
format json
reserve_data true
emit_invalid_record_to_error true
time_parse false
ignore_key_not_exist true
</filter>
Thanks!