Rancher从入门到精通- Filebeats input多个log文件,输出Kafka多个topic配置
filebeat.inputs:
- type: log
paths:
- /home/resource/project/upload/logs/userorderinfo_*.log
fields:
log_topic: userOrder
- type: log
paths:
- /home/resource/project/upload/logs/useraction_*.log
fields:
log_topic: userBehavior
- type: log
paths:
- /home/resource/project/upload/logs/servicecall_*.log
fields:
log_topic: userTest
output.kafka:
# initial brokers for reading cluster metadata
hosts: ["10.0.0.111:9092", "10.0.0.112:9092", "10.0.0.113:9092"]
# message topic selection + partitioning
topic: '%{[fields.log_topic]}'
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000
文章来源: blog.csdn.net,作者:隔壁老瓦,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/wxb880114/article/details/108072272
- 点赞
- 收藏
- 关注作者
评论(0)