filebeat+kafka

jiangkai00 2020-01-02

kafka出现接收不到filebeat数据,最后发现版本兼容问题

filebeat换成  filebeat-7.4.2-linux-x86_64 

kafka是docker-compose启动的,版本是kafka_2.12-2.3.0

filebeat配置

filebeat.inputs:
  - type: log
    enabled: true
    paths:
      - /opt/logs/debug.log   #日志路径
output.kafka:
  hosts: ["10.238.2.228:9092", "10.238.2.229:9092", "10.238.2.230:9092"]   #kafka地址
  topic: ‘xxx-debug-log‘
  required_acks: 1
  compression: gzip
  max_message_bytes: 1000000
  processors:
    - drop_fields:
        fields: ["input", "ecs", "agent"]

相关推荐