Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[summary] how to deal with the situation when the filebeat process is full of disk

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Using filebeat to collect logs, log files are frequently rotate, resulting in filebeat occupied files do not release, as long as filebeat keeps the deleted file Open state, the operating system does not release disk space, resulting in a gradual reduction of available disk space. The following monitoring diagram shows that after killing the filebeat process, the disk footprint drops sharply.

Using the lsof command to look at the file resources held by filebeat, you can find many invalid files (deleted) files that are occupied by filebeat.

Files in deleted state are not released and always occupy disk space

Solution:

View the filebeat configuration file location: / etc/filebeat/filebeat.yml

Add close_timeout: 5m to the configuration file to ensure that file handler is turned off every 5 minutes, regardless of whether or not the EOF symbol is encountered.

It is important to note that this close_timeout parameter will result in data loss if the Filebeat does not process to the end of the file and the file is deleted.

Filebeat.prospectors:

-type: log

Paths:

-/ opt/apps/ecm/service/storm/1.0.1/package/apache-storm-1.0.1/logs/workers-artifacts/xyz*/*/worker.log

Tail_files: false

Force_close_files: true

Close_timeout: 5m

Processors:

-add_cloud_metadata: ~

Output.logstash:

Hosts: ["10.10.10.10 6667"]

Loadbalance: true

Worker: 1

-

Configuration types such as close_rename,close_removed,close_eof,close_inactive are not valid for (deteled) state processing (tested and verified)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report