You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# create some windows-eventlog entries# powershell as admin:# create an eventlognew-eventlog-LogName KnolletTest -Source Knollet
# a short messagewrite-eventlog-LogName KnolletTest -Source Knollet -EventID 123-Message "This is a testmessage`n"# a really long message:write-eventlog-LogName KnolletTest -Source Knollet -EventID 123-Message "This is a message with over 10,000 chars <insert 10,000 chars here>`n"
prerequisites
telegraf config
Logs from Telegraf
System info
Windows Telegraf 1.32.1
Steps to reproduce
Expected behavior
All events should be fetched, else something could get lost, which is a problem with a monitoring agent
Actual behavior
Events get lost and I didn't even see an error logged despite of
-debug
.Additional info
As win_eventlog entries are limited in length by windows though, there's no need to check beforehand how much space might be required to malloc.
Some googling (for example, here)
https://www.quibiq.de/en/news/news-detail/news/detail/News/message-laengen-beschraenkung-im-event-log/page/8/
(sorry, it's German)
reveals, entries are limited to 64k and, as they're UTF-16 encoded, as it seems, to 32k characters.
So the buffer length in
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/win_eventlog/win_eventlog.go#L57
should be
1<<16
and not1<<14
which limits messages to a fourth of the actually possible length. which is about 32k/4 chars so around 8000 characters.If
1<<16
doesn't fit, because thebuflen
has to be given as aUINT16
, it should be(1<<16) - 1
The text was updated successfully, but these errors were encountered: