FileBeat
FileBeat使用说明
FileBeat是一个日志收集器,基于Logstash-Forwarder的源代码。FileBeat一般以代理的身份运行在客户端服务器中,并监视用户指定的目录、文件,同时把日志文件更新部分推送给Logstash解析或者直接推送给ES索引。
FileBeat的工作方式:
当FileBeat在服务器上启动后,它同时启动一个或者多个prospectors来监视用户指定的日志文件目录。
prospectors然后针对每个日志文件,都启动一个harvester,每一个harvester监视一个文件的新增内容,并把新增内容送到spooler中。然后spooler来汇总这些events事件。然后把这些事件传送给logstash或者es。
一、 FileBeat的安装配置
1. FileBeat的通用配置
FileBeat的使用与ES、Logstash基本一样,从官方网站下载*.tar.gz文件,然后解压。添加配置文件,然后就可以运行了。
如果用rpm或者deb的安装包,配置文件的位置在:
/etc/filebeat/filebeat.yml。
下面是一个默认的配置文件:
filebeat:
# List of prospectors to fetch data.
prospectors:
# Each - is a prospector. Below are the prospector specific configurations
-
# Paths that should be crawled and fetched. Glob based paths.
# For each file found under this path, a harvester is started.
paths:
- "/var/log/*.log"
#- c:\programdata\elasticsearch\logs\*
# Type of the files. Based on this the way the file is read is decided.
# The different types cannot be mixed in one prospector
#
# Possible options are:
# * log: Reads every line of the log file (default)
# * stdin: Reads the standard in
input_type: log
# Type to be published in the 'type' field. For Elasticsearch output,
# the type defines the document type these entries should be stored
# in. Default: log
document_type: syslog
......
input_type决定了被监听文件的读取方式,同一个prospector不能混用不同的input_type, 可选的类型有log和stdin。
document_type会在日志的输出中增加一个type的字段。如果输入的对象是es,那么这个字段就是es中文档的类型。
在设置日志文件的路径时,每一个prospector监视一个路径(目录)。
FileBeat的更多相关文章
- ELK日志系统:Filebeat使用及Kibana如何设置登录认证
根据elastic上的说法: Filebeat is a lightweight, open source shipper for log file data. As the next-generat ...
- Beats数据采集---Packetbeat\Filebeat\Topbeat\WinlogBeat使用指南
Beats是elastic公司的一款轻量级数据采集产品,它包含了几个子产品: packetbeat(用于监控网络流量). filebeat(用于监听日志数据,可以替代logstash-input-fi ...
- ELK+FileBeat+Log4Net
ELK+FileBeat+Log4Net搭建日志系统 output { elasticsearch { hosts => ["localhost:9200"] } stdou ...
- 日志分析 第四章 安装filebeat
在进行前面准备之后可以开始安装了,我们的安装顺序是filebeat--->logstash--->elasticsearch filebeat安装很简单,先下载filebeat,这里我们使 ...
- filebeat 多行日志的处理
配置文件位于/etc/filebeat/filebeat.yml,就是filebeat的主配置文件 打开文件,搜索multiline:,默认是注释的,常用的有如下三个配置: multiline: pa ...
- filebeat安装与基础用法
来自官网,版本为1.2 下载rpm包并安装 wget -c https://download.elastic.co/beats/filebeat/filebeat-1.2.3-x86_64.rpm r ...
- kibana ,logstash and filebeat
https://www.elastic.co/guide/en/kibana/current/install.html https://www.elastic.co/guide/en/logstash ...
- ELK+FileBeat+Log4Net搭建日志系统
ELK+FileBeat+Log4Net搭建日志系统 来源:https://www.zybuluo.com/muyanfeixiang/note/608470 标签(空格分隔): ELK Log4Ne ...
- logstash配合filebeat监控tomcat日志
环境:logstash版本:5.0.1&&filebeat 5.0.1 ABC为三台服务器.保证彼此tcp能够相互连接. Index服务器A - 接收BC两台服务器的tomcat日志 ...
- Filebeat中文指南
Filebeat中文指南 翻译自:https://www.elastic.co/guide/en/beats/filebeat/current/index.html 译者:kerwin 鸣谢:tory ...
随机推荐
- EL表达式复习
EL表达式格式: 格式1:${objName.attribute} 执行的过程为:从pageContext.request.session.application中依次查找绑定名为“user”的对象, ...
- Hdu1093
#include <stdio.h> int main() { int T,n; ; while(scanf("%d",&T)!=EOF){ while(sca ...
- vs 自动生成core dump文件
一直以来觉着core dump这个东西很神奇,在初步学习的时候也没有个大方向,最近项目需要记录程序崩溃时的日志信息,因此在网上寻找相关的信息,此时core dump也成为了我重点关注的东西. 说说我的 ...
- XPath <第四篇>
.Net框架下的System.Xml.XPath命名空间提供了一系列的类,允许你应用XPath数据模式查询和展示XML文档数据. 一.XPath介绍 XPath有七种类型的节点:元素.属性.文本.命名 ...
- 《Programming WPF》翻译 第3章 4.我们进行到哪里了?
原文:<Programming WPF>翻译 第3章 4.我们进行到哪里了? 控件是由应用程序创建的块.它们描述了用户用来交互的界面特征.控件提供了行为,依赖样式和模板来表示一个外观.输入 ...
- MySQL强制性操作
1.强制索引FORCE INDEX SELECT * FROM TABLE1 FORCE INDEX (FIELD1) … 只使用建立在FIELD1上的索引,而不使用其它字段上的索引. 2.忽略索引 ...
- 10个工具让你的 shell 脚本更强大
10个工具让你的 shell 脚本更强大 很多人误以为shell脚本只能在命令行下使用.其实shell也可以调用一些GUI组件,例如菜单,警告框,进度条等等.你可以控制最终的输出,光标位 置还有各种输 ...
- UML--建模
建模公式 这种精华的东西,一定是值得研读和实践的! myself:人,事,物,规则. 人,业务主角.业务工人.参与者.如果应用到教务系统中,就是管理员,主任,老师的关系. 事,业务用例,系统用例. 物 ...
- 做一个有理想的IT人
前段时间一直以来都在思考生命的价值的问题,一直在想人的一生的追求是什么.在这个物欲横流的社会,对人的价值的定义只是在财富积累的多少,这个是大多数人所认为的.但人的一生顶多百年,百年之后这些虚荣划归为尘 ...
- impala编译
impala编译 编译系统centos 5.10 说明:版本1.3.x----2.1.x都能编译 一.预装库 1.gcc安装 yum install gcc44 yum install gcc44-c ...