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

Filelog Receiver Multiline Does Not Split Log Entries #35162

Closed
ztporteous opened this issue Sep 12, 2024 · 4 comments
Closed

Filelog Receiver Multiline Does Not Split Log Entries #35162

ztporteous opened this issue Sep 12, 2024 · 4 comments
Labels
needs triage New item requiring triage receiver/filelog

Comments

@ztporteous
Copy link

Component(s)

receiver/filelog

Describe the issue you're reporting

Implementation of the multiline filelog receiver pattern does not work as expected.

This is an issue experienced across multiple files please see the attached for a specific example.

Here is a snippet of the file being parsed:
image

Here is the filelog receiver YAML:
image

Here is the output:
image

As you can see, despite the multiline start pattern regex matching, the body of the log message contains two log lines from the file. This is due to me writing them both at the same time in this case, however also occurs if the file is created with multiple pre-populated entries. I have experienced the same issue with the SQL Server log file.

The behaviour I'm experiencing is the multiline feature does not split lines by the pattern. It works as intended if new log entries are written one at a time, however if multiple are committed to the file simultaneously, the receiver does not process this and bundles all new lines into one single log entry.

@ztporteous ztporteous added the needs triage New item requiring triage label Sep 12, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@VihasMakwana
Copy link
Contributor

Thanks for filing this issue. I'll try to reproduce this.

@VihasMakwana
Copy link
Contributor

The issue is with your regex for line_start_pattern.

You're using [A-Z]\d{4} d{2}:\d{2}:\d{2}.\d{6}, but you should be using [A-Z]\d{4} \d{2}:\d{2}:\d{2}.\d{6} (notice the \).

Let me know if it fixes the issue?

@ztporteous
Copy link
Author

You are absolutely correct :/
Must've trimmed off at some point when removing the target group name from the regex beneath it..
Apologies! And thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage New item requiring triage receiver/filelog
Projects
None yet
Development

No branches or pull requests

2 participants