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] Cannot add conditionals to grok processor #4767

Closed
NeRX322 opened this issue Jul 26, 2024 · 3 comments
Closed

[BUG] Cannot add conditionals to grok processor #4767

NeRX322 opened this issue Jul 26, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@NeRX322
Copy link

NeRX322 commented Jul 26, 2024

Describe the bug
I add conditional grok processor from the documentation to my dataprepper pipeline and i get error

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 72 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: while parsing a block mapping
in 'reader', line 17, column 10:
grok_when: '/type == "ipv4"'
^
expected , but found ''
in 'reader', line 18, column 12:
match:
^

reference: https://opensearch.org/docs/latest/data-prepper/pipelines/configuration/processors/grok/#conditional-grok

To Reproduce
Steps to reproduce the behavior:

  1. Go to dataprepper yml pipeline
  2. Add https://opensearch.org/docs/latest/data-prepper/pipelines/configuration/processors/grok/#conditional-grok
  3. Restart dataprepper
  4. See error

Expected behavior
Dataprepper is running, conditions work

Environment (please complete the following information):

  • OS: RHEL 8
  • Version: 2.8.0
123123
@NeRX322 NeRX322 added bug Something isn't working untriaged labels Jul 26, 2024
@dlvenable
Copy link
Member

@NeRX322 , The match option is an option for grok, not for grok_when. So you need to remove some extra spaces on it.

Please compare to the formatting below.

processor:
  - grok:
      grok_when: '/type =="ipv4"'
      match:
        message: [...]

@dlvenable dlvenable added question Further information is requested and removed bug Something isn't working untriaged labels Jul 30, 2024
@NeRX322
Copy link
Author

NeRX322 commented Aug 1, 2024

@dlvenable ye, that works, i found multiple documentation errors, where can i contribute and fix doc errors that i found in DataPrepper? I'm more than willing to do that

@dlvenable
Copy link
Member

@NeRX322 , Thank you for taking note of this. You can make contributions in the form of PRs in the documentation-website project.

The Data Prepper documentation is located in:

https://github.com/opensearch-project/documentation-website/tree/main/_data-prepper

Please see the documentation project's CONTRIBUTING guidelines as well.

@dlvenable dlvenable added the documentation Improvements or additions to documentation label Aug 1, 2024
@NeRX322 NeRX322 closed this as completed Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants