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

Unexpected pattern match behaviour #6

Open
grownuphacker opened this issue Jan 9, 2023 · 2 comments
Open

Unexpected pattern match behaviour #6

grownuphacker opened this issue Jan 9, 2023 · 2 comments

Comments

@grownuphacker
Copy link

Using the test data:
- - - 2022-12-23T05:25:05.584Z ERROR vsan-mgmt[20337] [VsanHttpRequestWrapper::urlopen opID=noOpId] Exception while sending request : <urlopen error timed out>

and the pattern:
- - - %{TIMESTAMP_ISO8601} %{NOTSPACE:event_severity} %{PROG:event_process}\[%{INT:event_pid}\] \[%{NOTSPACE:event_thread_name}( sub=%{NOTSPACE:event_sub_thread})? (?i)opid=%{NOTSPACE:event_operation_id}\]

Matches up until the final sementic (event_operation_id). This field is not populated and any further fields are right-shifted. The exact same test data on multiple other grok debuggers does not give the same result.

@cjslack
Copy link
Owner

cjslack commented Jan 12, 2023

Hi, thanks for letting me know. I'll have to dig into this. It's probably an issue with the dependency https://github.com/cjslack/grok-js-web, which was forked from https://github.com/Beh01der/node-grok

I would avoid using flag modifiers for now. Alternatively, for your specific example you can do something like this to achieve the desired result:

op(id|ID)=%{NOTSPACE:event_operation_id}\]

Full example here

@grownuphacker
Copy link
Author

Thanks. I appreciate the workaround - and the tool, it's very useful.

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