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

Possible error on the page How to write a parser (grok part) #2121

Open
nathan-out opened this issue Dec 4, 2024 · 0 comments
Open

Possible error on the page How to write a parser (grok part) #2121

nathan-out opened this issue Dec 4, 2024 · 0 comments

Comments

@nathan-out
Copy link

Hello,

I think there is an error on the page "How to write a parser" in the section "Grok". The documentation says :

The pattern should take into account every singe character of your event, from the first one to the last one.

I think the correct term is "MUST take into account" because when I write a grok pattern, if it doesn't match all the characters, then the log is not parsed at all. Here are my tests.


Data sent to grok pattern : Microsoft-Windows-Kernel-General:24 S-1-5-19 (0 240 2 0 0)

Functional grok pattern : %{DATA:source}:%{NUMBER:event_id} %{DATA:sid} %{DATA:data}. The last DATA item matchs every remaining character.

Non-functional grok pattern : %{DATA:source}:%{NUMBER:event_id}. No element matches all remaining characters and no parsed field is displayed in the right-hand “Test your parser” panel.

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

1 participant