Skip to content

Parsing CSV with multi line (postgres csvlog) #15601

Answered by jszwedko
masaiful asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @masaiful !

Yeah, I see. I think what you'll need to do is make sure that the multiline logs are parsed as a single event before parsing them as CSV using parse_csv. You can make use of the https://vector.dev/docs/reference/configuration/transforms/reduce/ transform to reduce multi-line logs into one line. Some sources, like the file source, also support multiline configuration to reduce the lines during ingest.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by masaiful
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants