"Summary" Filebeat process writes full disk case processing

Source: Internet
Author: User
Tags filebeat


Using Filebeat to collect logs, log files frequently rotate, resulting in filebeat occupied files are not released, as long as the filebeat keep the deleted file open state, the operating system will not free disk space, resulting in a gradual decrease in available disk space.

Using the lsof command to view the file resources maintained by Filebeat, you can find many invalid file (deleted) files that are filebeat occupied space.


Deleted state files are not released and always occupy disk space


Workaround:

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

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

It is important to note that the Close_timeout parameter causes data loss in cases where filebeat is not processed 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.109.3.193:6667"]
?? Loadbalance:true
?? Worker:1

"Summary" Filebeat process writes full disk case processing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.