##windows版
1、下载filebeat包,解压到指定目录
2、编写filebeat.yml配置文件
filebeat.inputs:
/- type: log
enabled: true
paths:
- C:\Users\yuantong\Desktop\wutong*.log
output.kafka:
enabled: true
hosts: [“192.168.10.112:9092”]
topic: test1
##去除无用字段信息
processors:
/- drop_fields:
fields: [“input_type”, “log.offset”, “host.name”, “input.type”, “agent.hostname”, “agent.type”, “ecs.version”, “agent.ephemeral_id”, “agent.id”, “agent.version”, “fields.ics”, “log.file.path”, “log.flags” ]
3、在此安装目录下,cmd
执行:filebeat -e -c filebeat.yml