容器收集时收集额外的信息太多了,能否通过配置的方式减少
我明白日志收集是按行收集的,收集后会封装成为一个json格式并且推送给kafka, 但是这意味着,我实际日志无论再小,都会因为封装变得很大
{
//....... 额外信息
message:"hello world",
//...... 额外信息
}
我发现额外信息竟然达到惊人的1k,其序列化,组装和压缩给日志收集主机的计算造成了挑战,请问有什么办法可以通过配置来定义额外信息的选择性发送么?
如果是用 filebeat 方式收集,可以修改 assets/filebeat/config.filebeat 文件,设置只输出日志的内容
output.kafka:
hosts: [$KAFKA_BROKERS]
topic: '%{[topic]}'
codec.format:
string: '%{[message]}'
非常感谢你的回答
Samsara [email protected] 于2021年1月22日周五 下午2:52写道:
如果是用 filebeat 方式收集,可以修改 assets/filebeat/config.filebeat 文件,设置只输出日志的内容 output.kafka: hosts: [$KAFKA_BROKERS] topic: '%{[topic]}' codec.format: string: '%{[message]}'
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AliyunContainerService/log-pilot/issues/319#issuecomment-765177937, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7DDQB5ULWRV2APGFSNGS3S3EOBJANCNFSM4WAKMWJQ .