Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-for-fluent-bit: allow extraParsers to override default parsers #1194

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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