FileBeats安装

FileBeats安装

FileBeats官方下载链接: https://www.elastic.co/downloads/beats/filebeat

也可以直接使用以下命令下载(文章下载目录一概为/home/tools, 解压后文件夹放到 /home/apps下)

wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.3.1-linux-x86_64.tar.gz

解压压缩包

#解压压缩包
tar -zxf filebeat-6.3.1-linux-x86_64.tar.gz

#将文件夹转移到apps目录下
mv filebeat-6.3.1-linux-x86_64 ../apps/

#进入filebeat目录
cd /home/apps/
filebeat-6.3.1-linux-x86_64

配置文件修改

vi filebeat.yml

修改以下配置

=======Filebeat inputs=======
#读取日志文件目录
enabled: true
paths:
    - /home/apps/logtest/*.log

=======Kibana=======
#Kibana安装在另一篇文章,地址:https://www.cnblogs.com/--1024/p/9306749.html
host: "192.168.193.129:5601"

=======Outputs=======
#这里我们将结果输出到LogStash,不直接输入Elasticsearch,因此将ES配置注掉,并放出LogStash配置

#output.elasticsearch:
#hosts:["localhost:9200"]
#LogStash安装在另一篇文章,地址:https://www.cnblogs.com/--1024/p
output.logstash:
  # The Logstash hosts
  hosts: ["192.168.193.129:5044"]
原文地址:https://www.cnblogs.com/--1024/p/9306837.html