Unable to populate data in "data" field from "msg" field using record transformer #4466
Unanswered
parshva-shah-dsw
asked this question in
Q&A
Replies: 1 comment
-
Do you mean the code I don't understand the expected input and output, but for example, you can do the following. <source>
@type sample
tag test
sample {"msg":"AAA"}
</source>
<source>
@type sample
tag test
sample {"message":"BBB"}
</source>
<filter test.**>
@type record_transformer
enable_ruby true
remove_keys msg
<record>
message ${record["message"] || record.fetch("msg", "nomsg")}
</record>
</filter>
<match test.**>
@type stdout
</match> Output
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
certain application are printing logs in "msg" field we are trying to transform the "msg" field to "message" field with record transformer. Whole setup is on kubernetes. below configuration is added in the fluentd configmap. can anyone help here to resolve the issue
References : https://docs.fluentd.org/filter/record_transformer
Beta Was this translation helpful? Give feedback.
All reactions