Filebeat无法将日志发送到Kafka

时间:2019-04-17 09:36:41

标签: elasticsearch apache-kafka elastic-stack filebeat elastic-beats

文件Beat无法从特定文件夹发送日志,这是应用程序日志文件夹。

已经尝试过的东西:

  • 在kafka中创建了一个新主题以重新测试设置。
  • 已检查文件夹和要发送的文件的文件许可权。
  • 已从5.5的Filebeat更新为6.7
  • 从filebeat.prospector更改为filebeat.inputs

运行配置:

 filebeat.inputs:
    - type: log
      paths:
        - /var/log/containers/*.log
    fields_under_root: true
    output.kafka:
      hosts: ["10.0.0.0:9092"]
      topic: "testtopic"
      codec.json:
        pretty: true

有了这个,我可以看到“ testtopic”中的所有日志

未运行配置:

filebeat.inputs:
    - type: log
      paths:
        - /app/log/server/*.log
    fields_under_root: true
    output.kafka:
      hosts: ["10.0.0.0:9092"]
      topic: "testtopic"
      codec.json:
        pretty: true

预期结果:/app/log/server/*.log路径中的日志应发送到Kafka

0 个答案:

没有答案
相关问题