kafka输出格式问题咨询 #1083
Answered
by
XTUxiongda
XTUxiongda
asked this question in
Help
kafka输出格式问题咨询
#1083
Replies: 3 comments 4 replies
-
|
把processor_json去掉试一下呢 |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
我使用的ilogtail的版本是1.7.0 |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
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

Uh oh!
There was an error while loading. Please reload this page.
-
`enable: true
inputs:
LogPath: /logs/fofund-ipmc/
FilePattern: "*.log"
processors:
SourceKey: content
KeepSource: false
ExpandDepth: 1
ExpandConnector: ""
flushers:
OnlyStdout: true
Brokers:
Topic: ipmc-log`
上述是我的配置文件。
我现在遇到的问题是,明明控制台的输出是一串json,但是写到kafka的数据会变成拼接了key和Value的数组,如下
{ "Time":1692756272, "Contents":[ { "Key":"__tag__:__path__", "Value":"/logs/fofund-ipmc/fofund-ipmc.2023-08-23.error.0.log" }, { "Key":"__tag__:__user_defined_id__", "Value":"default" }, { "Key":"appName", "Value":"fofund-ipmc" }, { "Key":"serverIP", "Value":"10.11.63.40:8080" }, { "Key":"traceId", "Value":"N/A" }, { "Key":"createTime", "Value":"2023-08-23 10:04:32 158" }, { "Key":"level", "Value":"ERROR" }, { "Key":"thread", "Value":"main" }, { "Key":"message", "Value":"获取id服务的id时异常,id取值逻辑保持原样" } ], "Time_ns":0 }我希望Contents里面都变成一串json和控制台输出一样,没有拼接Key,Value这一堆是可以实现的吗
Beta Was this translation helpful? Give feedback.
All reactions