beats是ELK体系中新增的一个工具,, 属于一个轻量的日记采集器。
1.安装(每台)
# tar xf filebeat-6.4.1-linux-x86_64.tar.gz
# mv filebeat-6.4.1-linux-x86_64 /usr/local/filebeat
#yum -y install httpd
#systemctl start httpd
2.测试filebeat正常运行
# cd /usr/local/filebeat/
# vim filebeat.yml
- filebeat.inputs:
- - type: log
- #enabled: false #这一句要注释掉,或改为true
- paths:
- - /var/log/httpd/access_log #指定收集的日志文件路径
- #output.elasticsearch: #先将这几句注释掉
- #hosts: ["192.168.148.133:9200"] #配置es服务器的ip地址
- output.console: #终端输出的测试
- enable: true
复制代码 # ./filebeat -c filebeat.yml
#新建窗口访问httpd服务,测试终端会网络日记数据
3.测试完成后,修改设置文件,让filebeat以服务的方式启动
# vim filebeat.yml
- #output.console: #把这两句注释掉
- # enable: true
- output.elasticsearch:
- hosts: ["192.168.148.132:9200"] #只需写一台主机,集群会自动分片到其他机器
复制代码 # jobs ;kill %1
# ./filebeat -c filebeat.yml &
4.启动乐成后, 到es服务器上检察索引
# curl 192.168.148.132:9200/_cat/indices?
可以看到新增了一个以filebeat开头的索引, 这就代表filesbeat和es能够正常通讯了
5.可以到kibana上设置这个索引并检察了
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |