# Filebeat takes hours to start harvesting logs after restart

**URL:** <https://discuss.elastic.co/t/filebeat-takes-hours-to-start-harvesting-logs-after-restart/290693>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 1, 2021, 4:17pm UTC](https://discuss.elastic.co/t/filebeat-takes-hours-to-start-harvesting-logs-after-restart/290693 "2021-12-01T16:17:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dancho](https://avatars.discourse-cdn.com/v4/letter/d/c5a1d2/32.png) [@Dancho](https://discuss.elastic.co/u/Dancho)\
**Post date:** [December 1, 2021, 4:17pm UTC](https://discuss.elastic.co/t/filebeat-takes-hours-to-start-harvesting-logs-after-restart/290693/1 "2021-12-01T16:17:17Z")

</div>

I have to use wildcards in the PATH section since my log files might be in many different locations.

```auto
filebeat.inputs:
- type: log
  paths:   
    - /folder1/*/*/*/folder2/**/*.log

```

after filebeat service restart, it takes hours for sending logs to Elastic. I tried to add

```auto
ignore_older: 10m
clean_inactive: 5h

```

didn't help much.  
syslog shows every 30 sec:

```auto
Non-zero metrics in the last 30s

```

and only after several hours it starts harvesting.  
I deleted the registry folder so it will start from scratch,  
content of the registry folder during that time:

```auto
sudo ls -lh /var/lib/filebeat/registry/filebeat
total 4.0K
-rw------- 1 root root 0 Nov 29 13:19 log.json
-rw------- 1 root root 15 Nov 29 13:19 meta.json

```

---

<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:** [December 29, 2021, 6:17pm UTC](https://discuss.elastic.co/t/filebeat-takes-hours-to-start-harvesting-logs-after-restart/290693/2 "2021-12-29T18:17:39Z")

</div>

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