Skip to content

Parsing apache access and error logs and inserting values in clickhouse #7772

Answered by spencergilbert
SirUrban asked this question in Q&A
Discussion options

You must be logged in to vote

I expect you'll want to merge the parsed log event.

The first config you used set the .message field to the parsed results (an object), and the second overwrote the entire event (".") with the parsed results.

So, I think you should either use the merge function, or an object merge assignment (example here) like so:

parsed = parse_apache_log!(.message, "combined")
merge!(., parsed)

or

. |= parse_apache_log!(.message, "combined")

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@jszwedko
Comment options

@SirUrban
Comment options

@SirUrban
Comment options

@jszwedko
Comment options

@jszwedko
Comment options

Answer selected by jszwedko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants