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: GROK parser doesn't work in fluentd.fluent.io_clusterfluentdconfigs #982

Open
kardanielyan opened this issue Nov 8, 2023 · 0 comments
Labels
good first issue Good for newcomers

Comments

@kardanielyan
Copy link

kardanielyan commented Nov 8, 2023

Describe the issue

I have an issue with the GROK parser.
I created Fluentd/ClusterFilter.
I specified the GROK pattern but am receiving the following error:

2023-11-06 11:14:09 +0000 [error]: config error file="/fluentd/etc/fluent.conf" error_class=Fluent::ConfigError error="no grok patterns. Check configuration, e.g. typo, configuration syntax, etc" level=error msg="Fluentd exited" error="exit status 1"

To Reproduce

This is a simplified version of my ClusterFilteryaml.

apiVersion: fluentd.fluent.io/v1alpha1
kind: ClusterFilter
metadata:
    filter.fluentd.fluent.io/enabled: 'true'
  name: fluentd-filter
spec:
  filters:
    - parser:
        keyName: message
        parse:
          grok:
            - name: test_logs
              pattern: "%{HOST:host} %{IPORHOST:client_ip}"
          type: grok
        reserveData: true
    - recordTransformer:
        enableRuby: true
        records:
          - key: environment
            value: stg

After applying the pattern field disappears.

Expected behavior

Parse logs based on GROK patterns.

Your Environment

- Fluent Operator version: v2.5.0
- Container Runtime: containerd
- Operating system: [GKE, Container-Optimized OS] (https://cloud.google.com/kubernetes-engine/docs/concepts/node-images#cos)
- Kernel version: 5.15.109+

How did you install fluent operator?

I deployed fluent-operator via the official HELM chart.
https://github.com/fluent/fluent-operator/releases/tag/v2.5.0

Additional context

No response

@benjaminhuo benjaminhuo added the good first issue Good for newcomers label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants