Open Nachtfalkeaw opened 1 week ago
Hi, the stage.eventlogmessage expects the log lines to have the format "key:value": https://github.com/grafana/alloy/blob/main/internal/component/loki/process/stages/eventlogmessage.go#L79 In the debug that you pasted, the empty lines and the lines "Ein Konto wurde erfolgreich angemeldet." and "Die Felder für die Authentifizierungsinformationen enthalten detaillierte Informationen zu dieser speziellen Anmeldeanforderung." don't follow this format, that's why the warning is triggered. Are you using the loki.source.windowsevent component to retrieve the windows logs?
@wildum Yes I use loki.source.windowsevent
and later stage.eventlogmessage
I see, that's weird because the loki.source.windowsevent is supposed to output json formated data. A few more debugging steps:
@wildum I am not sure but it looks like there are issues with parsing the timestamps. I use "timeCreated" label for "stage.timestamp" However it looks like the parsing I do is wrong.
How would you parse these timestamps?
2024-11-30T22:04:42.5148570Z
2024-11-30T22:04:00.0038331Z
stage.timestamp {
source = "ts"
format = "2006-01-02T15:04:05.???????Z"
location = "Europe/Berlin"
}
It looks like it is a fixed length of fractions of seconds with 7 digits.
And how would you format these timestamps?
2024-11-30T22:09:12.93555Z
2024-11-30T22:16:06.895674Z
2024-11-30T22:16:06.8987616Z
2024-11-30T22:06:13.0831491Z
The documentation is not clear for me: https://grafana.com/docs/alloy/latest/reference/components/loki/loki.process/#stagetimestamp-block
Do I have to use in the first example .000000000Z or .0000000Z ? And in the second example .999Z or .99999Z or .9999999Z ?
--- edit 2024-12-01 --- I think I found the issue. If the loki.process stage contains a "stage.timestamo" with "location" set and the format itself contains a timezone indicator like "Z" then the process fails. live_debugging then only shows [IN] but never [OUT].
INVALID:
stage.timestamp {
source = "ts"
format = "2006-01-02T15:04:05.0000000Z"
location = "Europe/Berlin"
}
VALID
stage.timestamp {
source = "ts"
format = "2006-01-02T15:04:05.0000000Z"
}
Back to the eventlog topic: I can replicate the issue if I do the following:
I attached 3 logfiles from "live_debugging"
01_debug_direct_after_loki_source_windowsevent_security.log 02_debug_after_loki_source_windowsevent_security_in_loki_process.log 03_debug_grafan_alloy_logging_block_severiy_warn.log
Describe the bug I want to collect windows eventlogs from german windows 10 with grafana alloy 1.5.0 and loki 3.3.0.
As a result some of my windows eventlogs with channel "security" can not be parsed correctly.
To Reproduce I am only logged in. I do not have any specific applications running. I can not say which process triggers these issues. I think it is enough to have a Windows 10 computer or maybe any other recent WIndows system - maybe german language and alloy installed.
Expected behavior Should parse all the logs correctly
Environment: Windows 10, German, Alloy 1.5.0, Loki 3.3.0
Screenshots, Promtail config, or terminal output
Example of live_debugging of "loki.process"
This is the Windows event log:
New example:
Windows Event log: