Filebeat Autodiscover Issue

Some errors occurred when I had below filebeat config. How can I fix the issue?

org.elasticsearch.index.mapper.MapperParsingException: object mapping for [json] tried to parse field [json] as object, but found a concrete value

  filebeat.yml: |-
    filebeat.autodiscover:
      providers:
        - type: kubernetes
          node: ${NODE_NAME}
          hints.enabled: true
          hints.default_config:
            type: container
            paths:
              - /var/log/containers/*.log
            multiline.pattern: '^[[:space:]]+(\bat\b|\.{3})|^Caused by:'
            multiline.negate: false
            multiline.match: after
            processors:
              - add_kubernetes_metadata:
                  host: ${NODE_NAME}
                  matchers:
                  - logs_path:
                      logs_path: "/var/log/containers/"
              - decode_json_fields:
                  fields: ["message"]
                  target: "json"
                  process_array: false
                  max_depth: 1
                  add_error_key: true

Would you mind sharing the sample log that failed processing?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.