转载地址:https://dongbo0737.github.io/2017/06/13/filebeat-config/

Filebeat配置文件解析

filebeat 一个ELK架构中,专门用来收集数据的插件

官网:https://www.elastic.co/guide/en/beats/filebeat/5.2/index.html

filebeat安装很简单,推荐使用tar包下载,解压

配置文件需要放置在一个专门的目录中

filebeat.yml

shipper:
name: 147240-filebeat-1
queue_size: 1000
filebeat:
spool_size: 2048
idle_timeout: 2s
registry_file: /data/logs/filebeat/filebeat-1/.filebeat #存储偏移量文件
publish_async: false #异步推送
prospectors:
- paths:
- /data/logs/tomcat/aa-am.log #定义被收集的日志的路径
document_type: logs #文档乐行
ignore_older: 24h # 忽略24小时之前的日志
close_older: 1h
scan_frequency: 10s # 10秒扫描一次文件
tail_files: true
force_close_files: true
fields_under_root: true
fields: #定义收集的日志特有属性
app: sam
server: tomcat
ver: 1
hostip: 127.0.0.1
logname: test-am
module: dm
assigner: DongBo
logid: 1476203703774
multiline:
pattern: '^[[:space:]]+|^Caused by:'
negate: false
match: after
max_lines: 500
output.kafka: # 将收集到的日志推送到kafka中
hosts: ["kafkahost:port1","kafkahost:port2"]
topic: business #定义topic
key: business
partition.round_robin:
reachable_only: false
required_acks: 1
compression: gzip
max_message_bytes: 1000000
logging: # filebeat自身打印日志
level: info
to_files: true
to_syslog: false
files:
path: /data/logs/filebeat/filebeat-1
rotateeverybytes: 104857600
name: filebeat.log
keepfiles: 7

Filebeat配置文件解析-转载的更多相关文章

  1. Logtash 配置文件解析-转载

    转载地址:https://dongbo0737.github.io/2017/06/13/logstash-config/ Logtash 配置文件解析 logstash 一个ELK架构中,专门用来进 ...

  2. Hadoop配置文件解析

    Hadoop源码解析 2 --- Hadoop配置文件解析 1 Hadoop Configuration简介    Hadoop没有使用java.util.Properties管理配置文件, 也没有使 ...

  3. MyBatis 源码分析 - 配置文件解析过程

    * 本文速览 由于本篇文章篇幅比较大,所以这里拿出一节对本文进行快速概括.本篇文章对 MyBatis 配置文件中常用配置的解析过程进行了较为详细的介绍和分析,包括但不限于settings,typeAl ...

  4. Golang配置文件解析-oozgconf

    代码地址如下:http://www.demodashi.com/demo/14411.html 简介 oozgconf基于Golang开发,用于项目中配置文件的读取以及加载,是一个轻量级的配置文件工具 ...

  5. MyBatis配置文件解析

    MyBatis配置文件解析(概要) 1.configuration:根元素 1.1 properties:定义配置外在化 1.2 settings:一些全局性的配置 1.3 typeAliases:为 ...

  6. Nginx安装与配置文件解析

    导读 Nginx是一款开放源代码的高性能HTTP服务器和反向代理服务器,同时支持IMAP/POP3代理服务,是一款自由的软件,同时也是运维工程师必会的一种服务器,下面我就简单的说一下Nginx服务器的 ...

  7. Python3 配置文件 解析

    /************************************************************************ * Python3 配置文件 解析 * 说明: * ...

  8. Hibernate的配置文件解析

    配置mybatis.xml或hibernate.cfg.xml报错: <property name="connection.url">jdbc:mysql://loca ...

  9. WCF中配置文件解析

    WCF中配置文件解析[1] 2014-06-14 WCF中配置文件解析 参考 WCF中配置文件解析 返回 在WCF Service Configuration Editor的使用中,我们通过配置工具自 ...

随机推荐

  1. node.js 中间件

    node.js 中间件 node.js middleware Express middleware body-parser cookie-parser cookie-session cors csur ...

  2. iOS remote debug & Android remote debug & Chrome & APP

    iOS remote debug & Android remote debug & Chrome & APP iOS remote debugging 如何在 iOS 真机上调 ...

  3. SVG 2 & SVG & getPointAtLength & getPathSegAtLength

    SVG 2 & SVG & getPointAtLength & getPathSegAtLength getPointAtLength SVG 1.x https://dev ...

  4. qt 注册热键

    原文 将所需的库添加到您的qmake项目(.PRO文件) LIBS += \ -lUser32 2.在代码中包含所需的头文件. #include <windows.h> 在程序开始时注册热 ...

  5. qt 移动窗口MoveWindow

    RECT r; GetWindowRect(this->gameHwnd, &r); // 获取窗口的宽度和高度 int nWidth = r.right - r.left; int n ...

  6. rxjs 常用的subject

    api列表 Subject Subject是可观察的一种特殊类型,它允许将值多播到许多观察者 import {Subject} from 'rxjs'; const l = console.log; ...

  7. idea配置阿里maven镜像

    首先打开IDEA安装路径下的:"\plugins\maven\lib\maven3\conf\settings.xml" 找到里面的mirror配置,进行修改如下: <mir ...

  8. vue之provide和inject跨组件传递属性值失败(父组件向子组件传值的两种方式)

    简单介绍:当一个子组件需要用到父组件的父组件的某些参数.那么这个时候为了避免组件重复传参,使用vue的依赖注入是个不错的方法,直接在最外层组件设置一个provide,内部不管多少嵌套都可以直接取到最外 ...

  9. 关于电脑硬盘的二三事(SATA接口)

    @ 目录 前言 接口分类 SATA3接口 机械硬盘 机械硬盘的特点和主要参数 西部数据机械盘分类 绿·蓝·黑盘 红盘 紫盘 金盘 希捷机械盘分类 酷狼 酷鱼 酷鹰 银河 SATA3接口的固态硬盘 固态 ...

  10. springboot全局属性

    ```properties # =================================================================== # COMMON SPRING ...