-
Notifications
You must be signed in to change notification settings - Fork 248
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
[loki.process] stage.eventlogmessage - invalid line parsed from message #982
Comments
same here. Up |
Same setup, same problem. Any help/news on this? |
Again same setup, same problem! |
Hi there, Thanks for the help |
I found the Same issue and openwd a separate Ticket before i found this. |
Hello, thanks for reporting this bug. What's happening is that the eventlogmessage stage is expecting the windows message to contain a list of key-value pairs split by new lines. This is incorrect because windows messages sometimes contain empty lines or lines that don't have ":" (https://learn.microsoft.com/en-us/previous-versions/windows/desktop/bb226812(v=vs.85)#message-format). As a result, it logs a warning for every line that's not a key-value pair. The other lines are properly extracted and can be used by the other stages (for example the stage.labels if you want to have some of the values as labels). There is a trick here though: the non-alphabetical characters are transformed into "_" and that counts for "\t" as well. So if you have "\tSecurity ID", you can get it as "SecurityID" label with:
This is definitely not ideal + the info that's not formatted as key-value is lost (and the key-value pairs that have values on several lines are truncated). This stage definitely needs some improvements. I suggest that we should first change the log level from Warn to Debug. |
Hello @wildum, thanks for taking a look. |
Hey everyone, I'm working on a new stage "windowsevent" which covers the same functionality as the eventlogmessage stage but with a different parser to correct the flaws that were discovered via this ticket. Here is the PR: #2545 I don't have experience monitoring Windows machines at scale so I'm not sure which events are actually interesting and if the parsing is optimal for these events. If you do, I'd appreciate if you could share some feedback on the PR. The stage will be released in the experimental state so we can do breaking changes even after the PR is merged if needed. @jkroepke I don't know if you are using the eventlogmessage but since you are a Windows expert you might be interested in this new stage. @kelnage you also might want to have a look at it since you were involved in this topic in Loki |
Hi @wildum, thanks for your work! How can we access the Windows build from this PR to test it? |
Hi @wildum, no experience about event log. |
@Nachtfalkeaw, found the link in the PR, but I don't see any download link. Or I don't know how to use it correctly 😂 |
What's wrong?
message
not parsed fromloki.source.windowsevent
Steps to reproduce
v1.1.1
.Application
. There will be plenty of these message:System information
Microsoft Windows Server 2022 Standard - 10.0.20348 N/A Build 20348
Software version
alloy, version v1.1.1 (branch: HEAD, revision: 2687a2d)
Configuration
No response
Logs
No response
The text was updated successfully, but these errors were encountered: