# Putting mass archived log files to Elasticsearch using Filebeat

**URL:** <https://discuss.elastic.co/t/putting-mass-archived-log-files-to-elasticsearch-using-filebeat/270441>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 17, 2021, 7:11am UTC](https://discuss.elastic.co/t/putting-mass-archived-log-files-to-elasticsearch-using-filebeat/270441 "2021-04-17T07:11:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![h8h](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/h8h/32/87231_2.png) [@h8h](https://discuss.elastic.co/u/h8h)\
**Post date:** [April 17, 2021, 7:11am UTC](https://discuss.elastic.co/t/putting-mass-archived-log-files-to-elasticsearch-using-filebeat/270441/1 "2021-04-17T07:11:53Z")

</div>

Hello,

I am working in forensics and have a lot of log files, each 100MB in size.

I feel very uncomfortable using filebeat because it throws a lot of "too many open files" errors. I am not sure if every file is being processed.

I am aware of this article: [Too many open file handlers | Filebeat Reference [8.11] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/open-file-handlers.html)

Reading this article makes me wonder if filebeat is the right tool to import bulk archived files into elasticsearch:

> Filebeat keeps the file handler open in case it reaches the end of a file so that it can read new log lines in near real time.

I have no active files, every file is closed and I don't want filebeat to held the file handler open.

So is there a beat that will process one file after another and not watches for active files?

I know there are many options in filebeat, but filebeat is a good active logfile reader and file watcher. And I don't need these functions for my archived log files.

Thank you  
Chr1s

---

<div class="post-metadata">

**Author:** ![Jason\_Slater](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_slater/32/63484_2.png) [@Jason\_Slater](https://discuss.elastic.co/u/Jason_Slater)\
**Post date:** [April 17, 2021, 7:41am UTC](https://discuss.elastic.co/t/putting-mass-archived-log-files-to-elasticsearch-using-filebeat/270441/2 "2021-04-17T07:41:13Z")

</div>

See the --once option on this page:

> **[Filebeat command reference | Filebeat Reference \[7.12\] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/command-line-options.html)**

Within the input in filebeat.yml, you can configure close\_eof and harvester\_limit  
see this page: [Log input | Filebeat Reference [7.12] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html)

---

<div class="post-metadata">

**Author:** ![h8h](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/h8h/32/87231_2.png) [@h8h](https://discuss.elastic.co/u/h8h)\
**Post date:** [April 20, 2021, 7:29pm UTC](https://discuss.elastic.co/t/putting-mass-archived-log-files-to-elasticsearch-using-filebeat/270441/3 "2021-04-20T19:29:51Z")

</div>

Thanks for the --once option. That and the close\_eof did the trick.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 18, 2021, 9:30pm UTC](https://discuss.elastic.co/t/putting-mass-archived-log-files-to-elasticsearch-using-filebeat/270441/4 "2021-05-18T21:30:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
