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

bug: fluentbit.io/parser annotation not working properly #1370

Open
alternaivan opened this issue Oct 7, 2024 · 2 comments
Open

bug: fluentbit.io/parser annotation not working properly #1370

alternaivan opened this issue Oct 7, 2024 · 2 comments

Comments

@alternaivan
Copy link

alternaivan commented Oct 7, 2024

Describe the issue

We have a fluent-operator installed on the cluster in the fluent namespace, with namespace-provided configuration (filters, parsers, and output).

We have been using the kubernetes filter with the k8sLoggingParser: true option set in the default namespace, so we can specify a custom parser on the resource level, in the pod annotation, as described here.

We configured and applied the custom parsers with the namespaced Parser CRD on the default namespace.

When specifying the annotation on the pod level, the log field (which was not parsed via Kubernetes filter), doesn't get parsed by the parser specified via annotation. I've also tried using the parser name and the parser name with hashed namespaced suffix in the end. Both of those options didn't work.

For comparisson, I've also enabled the k8sLoggingExclude option, and the exclusion annotation. This seems to work as expected.

To Reproduce

Create a namespaced Parser and add an annotation on the pod level that specifies that parser.

Expected behavior

Log field is properly parsed via the custom parser specified in the annotation.

Your Environment

- Fluent Operator version: 3.2.0

How did you install fluent operator?

Via helm.

Additional context

No response

@cw-Guo
Copy link
Collaborator

cw-Guo commented Oct 7, 2024

just to confirm, do you turned on the merge_log option for kubernetes filter?

To perform processing of the log key, it's mandatory to enable the Merge_Log configuration property in this filter, then the following processing order will be done

see https://docs.fluentbit.io/manual/pipeline/filters/kubernetes#processing-the-log-value

@alternaivan
Copy link
Author

Hi @cw-Guo,

just to confirm, do you turned on the merge_log option for kubernetes filter?

Yes.

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

No branches or pull requests

2 participants