Skip to content

multiline parsing postfix logs? #7853

Answered by patrick-stephens
helmut72 asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think normal multiline parsing can do this for you.
You may be able to do it with a more powerful LUA filter or stream processing.
Or a custom plugin (e.g. Golang) to handle it.

The other thing I was thinking is to parse out the ID then use that in a second stage processing, e.g. send all lines for ID x to a specific file named by the ID, then tail that file and reconstruct as a normal multiline.

Or use the ID in the tag and get a LUA filter to reconstruct them in the same pipeline maybe?
Or maybe something dirty like running grep via exec on the file to just get matching lines for an ID?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@helmut72
Comment options

@patrick-stephens
Comment options

@helmut72
Comment options

Answer selected by helmut72
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