fluent / fluentd-kubernetes-daemonset

Fluentd daemonset for Kubernetes and it Docker image
Apache License 2.0
1.26k stars 978 forks source link

The parser plugin failed to parse the message #1331

Closed dgzpg closed 2 years ago

dgzpg commented 2 years ago

I use the same FluentD configuration, and the output content format is the same, but some of the final parsing results are successful, and some are not. The following is the configuration of my FluentD , I want to parse the json format string I output into a json, and the non-json format will remain as it is.

    <filter **>
        @type parser
        key_name log
        reserve_time true
        reserve_data true
        emit_invalid_record_to_error false
        hash_value_field log
        <parse>
          @type multi_format
          <pattern>
            format json
          </pattern>
          <pattern>
            format none
          </pattern>
        </parse>
      </filter>

The final output is as shown in the picture: image

The content format I output is a map in json format, but from the results, the value of the first log information log is a string, while the second and third are a json, so it seems that the first log Information Failed to parse json through FluentD's parser plugin.

Hope someone can help me with this problem, thanks a lot.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 30 days

github-actions[bot] commented 2 years ago

This issue was automatically closed because of stale in 30 days