Skip to content

Conversation

@0x2b3bfa0
Copy link

@0x2b3bfa0 0x2b3bfa0 commented Feb 8, 2025

Issue

When a parser defined in extraParsers has the same name as one of the default parsers, it will be ignored with the following message:

[2025/02/08 05:00:54] [error] [parser] parser named 'json' already exists, skip.

Description of changes

After changing the order of the Parsers_File directives, extraParsers will take precedence over the default parsers in cases where there is a naming collisions.

Checklist

  • Added/modified documentation as required (such as the README.md for modified charts)
  • Incremented the chart version in Chart.yaml for the modified chart(s)
  • Manually tested. Describe what testing was done in the testing section below
  • Make sure the title of the PR is a good description that can go into the release notes

Testing

Create a parser named e.g. json with a time format other than the default one, and put it into values.yaml

service:
  extraParsers: |
    [PARSER]
      Name        json
      Format      json
      Time_Key    time
      Time_Format %Y-%m-%dT%H:%M:%S.%L
      Time_Keep   On

Run fluent-bit and check that it can parse log lines with the specified time format.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@0x2b3bfa0 0x2b3bfa0 requested a review from dims as a code owner February 8, 2025 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant