Filebeats input多个log文件,输出Kafka多个topic配置
作者:互联网
Filebeats input多个log文件,输出Kafka多个topic配置:
# cat filebeat.yml filebeat.inputs: - type: log enabled: true paths: - /tagetik/logs/*.log fields: log_topic: tac-service-log tags: ['north-tac-app01'] include_lines: [".*"] - type: log enabled: true paths: - /home/tac/APP/wildfly/log/*.log fields: log_topic: tac-wildfly-log include_lines: [".*"] tags: ['north-wildfly-app01'] filebeat.config.modules: path: ${path.config}/modules.d/*.yml reload.enabled: false setup.template.settings: index.number_of_shards: 3 setup.kibana: output.kafka: hosts: ["10.0.1.110:9092","10.0.1.111:9092","10.0.1.112:9092"] topic: '%{[fields.log_topic]}'
log输出到到单topic配置实例:
filebeat.inputs: - type: log enabled: true paths: - /tagetik/logs/*.log include_lines: [".*"] tags: ['north-tac-app01'] filebeat.config.modules: path: ${path.config}/modules.d/*.yml reload.enabled: false setup.template.settings: index.number_of_shards: 3 setup.kibana: output.kafka: hosts: ["10.0.2.116:9092","10.0.2.117:9092","10.0.2.118:9092"] topic: tac-service-log
参考文档:https://www.elastic.co/guide/en/beats/filebeat/7.17/kafka-output.html#_password_4
标签:10.0,filebeat,Filebeats,log,多个,9092,topic,tac 来源: https://www.cnblogs.com/saneri/p/15919227.html