一.下载filebeat
https://www.elastic.co/downloads/beats/filebeat
二.上传安装
rpm -ivh filebeat-5.5.2-x86_64.rpm
三.配置filebeat
vim /etc/filebeat/filebeat.yml
在filebeat.prospectors下写入
Input_type 输入类型 有:log 和 stdin
Production 项目
Server 服务器名称
Application 应用
Logname 日志名
scan_frequency 检索时间
harvester_buffer_size 每次读取字节数
tail_files 是否只收集新的日志 默认false
如果收集多个文件,cp上图所有内容然后进行修改
输出
可以输出到elasticsearch或logstash
四.启动filebeat
Service filebeat start (start | stop | restart)
评论
发表评论