CentOS7 安装Beats的Filebeat收集日志插件
安装Beats的Filebeat收集日志插件
filebeat主要是,来收集客户端日志,并把收集日志发送到logstash进行日志分析,在让kebana做分析
1. 下载并安装GPG key
[root@elk-1 ~]# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
2. 添加yum仓库
[root@jenkins-master ~]# vim /etc/yum.repos.d/filebeat.repo
[root@jenkins-master ~]# cat /etc/yum.repos.d/filebeat.repo
[elastic-7.x]
name=Elastic repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
3. 安装filebeat插件
[root@elk-1 ~]# yum install -y filebeat
4. 启动
[root@elk-1 ~]#systemctl start filebeat
5. 设置开机启动
[root@elk-1 ~]#systemctl enable filebeat