How to handle NULL Byte Padded Log format (Meta Trader 4 Server / Trading Platform)? #20593
Unanswered
tamer-hassan
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Someone already explained this in their best effort here: https://discuss.elastic.co/t/how-to-read-logs-with-permanent-null-characters-at-the-end-of-file/324408
To sum it up briefly, Meta Trader 4 Server, a trading platform by MetaQuotes, writes latest log files in quite a peculiar way:
It pads the file with some Megabytes of NUL Bytes (\x000) in one long line, and upon writing some log lines / messages, it replaces some NUL bytes, and appends the remaining NUL bytes to the end/last line of the log.
This effectively confuses the file source in vector, and I could not find a way around it. Vector follows some, but then stops seeing new log lines / messages altogether at some point.
What I've tried:
result: warnings are still printed to stdout frequently by vector about discarding line over max allowed bytes (102400?), and vector stops seeing new messages / log lines after some minutes (effectively stopping sending to sink the latest log lines). So the problem is still at the file source.
ignore_checkpoints = true
to the file sourceresult: same as above. warnings about discarding of line above max allowed bytes, and vector stops seeing new log messages after some minutes, and has to be restarted to re-read the current log and start sending to the sink what it has missed , from where it left off.
Any ideas or input would be much appreciated!
Cheers
Beta Was this translation helpful? Give feedback.
All reactions