概述
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
最后
以上就是现代火车为你收集整理的Rancher从入门到精通- Filebeats input多个log文件,输出Kafka多个topic配置的全部内容,希望文章能够帮你解决Rancher从入门到精通- Filebeats input多个log文件,输出Kafka多个topic配置所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复