Skip to content

How to filed merge #17433

Answered by uglyliu
uglyliu asked this question in Q&A
May 18, 2023 · 4 comments · 7 replies
Discussion options

You must be logged in to vote

the following config is good,I have never understood that my log always needs to add this line,. = parse_json!(.message) if not, I can’t achieve the effect I want,the bad result like this photo

But I add this line . = parse_json!(.message), like following,it's can achieve the effect I want

[transforms.parse_remap]
type = "remap"
inputs = ["dummy_logs"]
drop_on_error = false
source        = """
             . = parse_json!(.message)
             .message = parse_grok!(.message,"%{TIMESTAMP_ISO8601:datestamp} %{GREEDYDATA:extra}")
             .tags = .tags[0]
             .@timestamp = parse_timestamp!(.message.datestamp, format: "%F %T%.3f")
             .timestamp = now()
             .…

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@uglyliu
Comment options

@spencergilbert
Comment options

@uglyliu
Comment options

@spencergilbert
Comment options

@uglyliu
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@spencergilbert
Comment options

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