当前位置:网站首页>How does Filebeat maintain file state?
How does Filebeat maintain file state?
2022-08-03 12:14:00 【Cloud Computing-Security】

Author: rab
1. Question
There is such a problem in actual testing/production. If the output target Kafka, ES, Kibana cannot be connected (accessed), how does Filebeat keep the file state?Is the file content successfully sent to the output?
2. Answer ️
The answer is yes, Filebeat will save the state of each file, it will flush the state in the registry file to disk, which records the harvester reads the last offset of the file, if output like Elasticsearch or Logstash is not accessible at this point, Filebeat keeps track of the last few lines sent, and continues reading the file when the output is available again, thus ensuring that all log lines are sent.
While Filebeat is running, state information for each input is also kept in memory.When Filebeat restarts, the data from the registry file is used to rebuild the state, and Filebeat continues each harvester at the last known location (ie, continues to collect the current latest data and output to the output destination).
That is, only Filebeat successfully sends the log content to the output destination (Kafka, ES, Kibana) from harvester until the output confirms that it has received the event, the next round of harvester will be opened.If you close Filebeat in the middle of sending events, it will not wait for the output to confirm that all events have been received before closing, any events sent to the output but not acknowledged before Filebeat shuts down, inThe is sent again when Filebeat restarts.This ensures that each event is sent at least once, but may end up sending duplicate events to the output.We can do this by setting shutdown_timeoutThe option configures Filebeat to wait a specific amount of time before shutting down.

For more questions, please refer to Official Documentation
边栏推荐
- 使用.NET简单实现一个Redis的高性能克隆版(一)
- 项目概述、推送和存储平台准备
- 肝完Alibaba这份面试通关宝典,我成功拿下今年第15个Offer
- LeetCode-1796. 字符串中第二大的数字
- 利用ChangeStream实现Amazon DocumentDB表级别容灾复制
- Chapter 15 Source Code File REST API Introduction
- R语言绘制时间序列的自相关函数图:使用acf函数可视化时间序列数据的自相关系数图
- (通过页面)阿里云云效上传jar
- bash for loop
- R语言使用ggpubr包的ggtexttable函数可视化表格数据(直接绘制表格图或者在图像中添加表格数据)、使用tab_add_vline函数自定义表格中竖线(垂直线)的线条类型以及线条粗细
猜你喜欢

第5章 实现首页Tab数据展示

为什么越来越多的开发者放弃使用Postman,而选择Eolink?

net start mysql 启动报错:发生系统错误5。拒绝访问。

从零开始C语言精讲篇5:指针

Kubernetes 网络入门

mysql advanced (twenty-four) method summary of defense against SQL injection

Matlab学习11-图像处理之图像变换

零信任架构分析【扬帆】

最牛逼的集群监控系统,它始终位列第一!

Five super handy phone open-source automation tools, which is suitable for you?
随机推荐
为什么越来越多的开发者放弃使用Postman,而选择Eolink?
Matlab学习10-图像处理之傅里叶变换
I in mother's womb SOLO20 years
【Verilog】HDLBits题解——Circuits/Sequential Logic/Latches and Flip-Flops
无监督学习KMeans学习笔记和实例
想学自动化测试网课哪个好?过了人告诉你:适合自己的才是最重要
R语言ggplot2可视化:使用patchwork包的plot_layout函数将多个可视化图像组合起来,ncol参数指定行的个数、byrow参数指定按照行顺序排布图
App自动化测试怎么做?实战分享App自动化测试全流程
数据库系统原理与应用教程(074)—— MySQL 练习题:操作题 141-150(十八):综合练习
深度学习中数据到底要不要归一化?实测数据来说明!
深度学习跟踪DLT (deep learning tracker)
LeetCode刷题笔记:105.从前序与中序遍历序列构造二叉树
业界新标杆!阿里开源自研高并发编程核心笔记(2022最新版)
From the physical level of the device to the circuit level
字节最爱问的智力题,你会几道?
Knowledge Graph Question Answering System Based on League of Legends
Five super handy phone open-source automation tools, which is suitable for you?
特征工程学习笔记
Matlab学习11-图像处理之图像变换
什么是bin文件?「建议收藏」