转载地址: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

最新文章

  1. 极路由访问Apple Store可以浏览但是不能下载的解决方案
  2. TRIGGER_15.8.3BACKUP
  3. int 和 string 相互转换(简洁版)
  4. SQL 聚合函数
  5. Python自动化测试工具Splinter简介和使用实例
  6. http80端口转发(实现微信公众号接口绑定IP时,同时支持多个公众号)
  7. Python应用与实践
  8. C++ map详解
  9. highChartTable 切换
  10. Web前端发展简史
  11. FFMpeg.H264解码win开发环境搭建
  12. lambda及参数绑定
  13. 11、jQuery其余操作
  14. windows安装Anaconda3
  15. JVM内的守护线程Deamon与用户线程User Thread
  16. mysql表空间文件
  17. vs2017 xamarin新建单独UWP类库提示不兼容
  18. html5页面头部
  19. Website蝴蝶结构
  20. WebGl 利用drawArrays、drawElements画三角形

热门文章

  1. js 实现各种数据结构 APP
  2. 2021,狗狗币暴涨,VAST更加疯狂!
  3. 牛市下SPC新空投糖果来了
  4. iOS拍照定制之AVCaptureVideoDataOutput
  5. <span>居中
  6. MySQL学习笔记(五)
  7. QT实现输入框与下拉框提示并可模糊匹配
  8. keras环境搭建
  9. Java数组练习(打印杨辉数组)
  10. 看动画轻松学会 Raft 算法