1、windows下安装Filebeat
下载安装包filebeat-6.6.2,并解压
修改配置文件filebeat.yml
#=========================== Filebeat inputs =============================
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
enabled: true
paths:
#- /var/log/*.log
- C:\logstashTmp\log\*
multiline:
#解决多行合并问题 自行填写适合自己的正则表达式
pattern: '^[0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3}'
negate: true
match: after
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["192.168.0.67:9200"]
2、cmd运行
在当前目录下,新建一个bat文件,eg : run.bat 内容
.\filebeat -e -c filebeat.yml
单击bat,启动filebeat