当前位置:网站首页>How Filebeat ensures that the log file is still correctly read when the log file is split (or rolled)
How Filebeat ensures that the log file is still correctly read when the log file is split (or rolled)
2022-07-30 00:13:00 【Sadness from the ages】
During peak traffic periods, there will always be missing log collection. After investigation, the matching rules are not appropriate, and the scan_frequency defaults to 10s. In these 10s, multiple files may be missed, resulting in missing collection.close_inactive
This parameter specifies how long to close the file handle when the monitored file has not changed.The official recommendation is to set this parameter to a value larger than the maximum file update interval.For example, the file is updated every 5s at most, then set it to 1min.The default value is 5min.
scan_frequency
This parameter specifies how often (time interval) Filebeat searches for new files.When a new file is found to be created, Filebeat will start another harvester for it to monitor.The default is 10s.
Combining the above two mechanisms, when logback completes log cutting (ie renaming), the old harvester is still monitoring the renamed log file, but since the file will not be updated, it will be closed at the close_inactive time.After closing the harvester of this file.When the scan_frequency time expires, Filebeat will find that a new file appears in the directory, so it starts the harvester for the file to monitor.This ensures that the data can be transmitted without loss or weight when the log is cut.(Not heavy is achieved by saving the offset for each log file)
边栏推荐
猜你喜欢

EA & UML Sun Gong Yip - Multitasking Programming Super Introductory - (7) About mutex, you must know

18 Lectures on Disassembly of Multi-merchant Mall System Functions

rk-boot框架实战(1)

Since the media how to write a short video title?Three hot style title, let your video gain more traffic

定时器学习

决策树原理及代码实现

EA&UML日拱一卒-多任务编程超入门-(8)多任务安全的数据类

opencv基本图像的滤波

Elephant Swap:借助ePLATO提供加密市场的套利空间

关于MySQL索引的一些个人理解(部分参考MySQL45讲)
随机推荐
Comprehensive Practice - Three-Mison Chess Mini Game
Worthington's tried and tested cell isolation system protocols
第一范式、第二范式、第三范式
YoloV5数据集自动划分训练集、验证集、测试集
读书笔记:《这才是心理学:看穿伪心理学的本质(第10版)》
【集训DAY16】KC ‘ s Stars【dfs】
Worthington细胞分离技术丨基本原代细胞分离方法和材料
opencv基本图像的滤波
自媒体短视频怎么提高播放量?从这三个方面入手
Getting Started with Sentinel
旋转数组的最小数字
基于TNEWS‘ 今日头条中文新闻(短文本)分类
【mysql】Mysql公用表表达式with as
vmtouch——Linux下的文件缓存管理神器
重建二叉树
MySQL 用 BETWEEN AND 日期查询包含范围边界
【集训DAY16】ALFA【凸壳】【计算几何】
News text classification
更换可执行文件glibc版本的某一次挣扎
ZLMediaKit源码分析 - NotifyCenter