-
Given log file content is:
Do you see an approach to dynamically detect structure and transform it into messages like this: {"date": "2023-02-23", "time": "00:00:02"}
{"date": "2023-02-23", "time": "00:00:03"}
{"date": "2023-02-24", "cs-method": "GET"}
{"date": "2023-02-24", "cs-method": "POST"} Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @yavulan , It won't be straight-forward, but it seems like this should be possible through configuration of the
Would be one entry. You could then parse that that emit multiple events from a If it is possible to change the output format to something more structured, though, I'd recommend doing that since parsing that sort of data is not going to be straight-forward, as you can see. |
Beta Was this translation helpful? Give feedback.
Hi @yavulan ,
It won't be straight-forward, but it seems like this should be possible through configuration of the
multiline
options on thefile
source to group each entry together and then parsing it. It seems like:Would be one entry. You could then parse that that emit multiple events from a
remap
program following https://vector.dev/highlights/2021-07-16-remap-multiple/. If VRL proves insufficient for parsing, you could also use alua
transform.If it is possible to change the output format to something more structured, though, I'd rec…