# Filebeat resends all logs in log file after host reboot - registry not maintaining last file position

**URL:** <https://discuss.elastic.co/t/filebeat-resends-all-logs-in-log-file-after-host-reboot-registry-not-maintaining-last-file-position/364543>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [August 7, 2024, 2:26pm UTC](https://discuss.elastic.co/t/filebeat-resends-all-logs-in-log-file-after-host-reboot-registry-not-maintaining-last-file-position/364543 "2024-08-07T14:26:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marmai16](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@marmai16](https://discuss.elastic.co/u/marmai16)\
**Post date:** [August 7, 2024, 2:26pm UTC](https://discuss.elastic.co/t/filebeat-resends-all-logs-in-log-file-after-host-reboot-registry-not-maintaining-last-file-position/364543/1 "2024-08-07T14:26:06Z")

</div>

Hello everyone,

i've encountered a strange issue regarding the elastic-agent, filebeat respectively.

I'am using a "Custom Logs" integration in Kibana, which is supposed to ship logs from a file on the host.  
This itself is of no issue.  
However, every time the host is rebooted, the contents of the log file are entirely sent again to elastic resulting in redundant data.

I was looking into the registry files, which i know are maintaining the positional information per log file for filebeat, so it knows what was already shipped.

To my surprise i found that my log file does not even appear in the registry (opposed to e.g. elastic agent logs, other integration log files).  
Does that imply the positional information is not being maintained at all?

Did anyone encounter such issue already ?

Setup: macOS with elastic-agent managed by fleet

---

<div class="post-metadata">

**Author:** ![Trevor\_Blackford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/trevor_blackford/32/120087_2.png) [@Trevor\_Blackford](https://discuss.elastic.co/u/Trevor_Blackford)\
**Post date:** [August 8, 2024, 5:05pm UTC](https://discuss.elastic.co/t/filebeat-resends-all-logs-in-log-file-after-host-reboot-registry-not-maintaining-last-file-position/364543/2 "2024-08-08T17:05:01Z")

</div>

Can you share the integration details?  
Can you share details of the file? Where is it, is it symlinked, does it auto-rotate?

---

<div class="post-metadata">

**Author:** ![OneWhoKnowsNothing](https://avatars.discourse-cdn.com/v4/letter/o/7c8e57/32.png) [@OneWhoKnowsNothing](https://discuss.elastic.co/u/OneWhoKnowsNothing)\
**Post date:** [August 12, 2024, 8:34pm UTC](https://discuss.elastic.co/t/filebeat-resends-all-logs-in-log-file-after-host-reboot-registry-not-maintaining-last-file-position/364543/3 "2024-08-12T20:34:57Z")

</div>

@marmai16  
So this is due to a problem with the data folder.  
the process is  
binary --path.config {location of the config file} --path.home {path of the modules and etc.} --path.data {location of the data this is where the progress of the crawler is saved} --path.logs {where logs will be saved} -c {name of the configuration file}  
you want to make sure that the the filebeat service can write in the path.data location. by default its located in /var/db/beats (in FreeBSD)  
I am not sure where it is on macOS
