# File input plugin lost first part of log line

**URL:** https://discuss.elastic.co/t/file-input-plugin-lost-first-part-of-log-line/61989
**Category:** Logstash
**Created:** [October 1, 2016, 2:53pm UTC](https://discuss.elastic.co/t/file-input-plugin-lost-first-part-of-log-line/61989 "2016-10-01T14:53:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Juan\_Rella](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@Juan\_Rella](https://discuss.elastic.co/u/Juan_Rella)
#### Post date: [October 1, 2016, 2:53pm UTC](https://discuss.elastic.co/t/file-input-plugin-lost-first-part-of-log-line/61989/1 "2016-10-01T14:53:55Z")

</div>

We're working with the version 2.3.x of logstash and we've defined a input file plugin to read apache logs on this way

```
file {
	add_field => ["timestamp", ""]
	path => "/var/log/httpd/access_log.*"
	start_position => end
	type => "beaconEvent"
	sincedb_path => "/since/.sincedb*"
	sincedb_write_interval => 15
}

```

we've detected that sometimes this plugin reads an incomplete access log line. It lose an unknown amount of characters at the beginning of this line.  
It seems to be related with the offset it is handle on sincedb\_path but we could not find a pattern. we removed all files of sincedb\_path it worked ok with a big volume or records.  
We've watched there was a same issue on previous versions of this tool ([https://logstash.jira.com/browse/LOGSTASH-1503](https://logstash.jira.com/browse/LOGSTASH-1503)) . does anybody could help me?

---

<div class="post-metadata">

### Author: ![LionelCons](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@LionelCons](https://discuss.elastic.co/u/LionelCons)
#### Post date: [June 29, 2017, 6:18am UTC](https://discuss.elastic.co/t/file-input-plugin-lost-first-part-of-log-line/61989/2 "2017-06-29T06:18:24Z")

</div>

We have seen the same problem with Kafka logs (log4j) and Logstash 5.4.

This might be the same problem as [https://github.com/logstash-plugins/logstash-input-file/issues/151](https://github.com/logstash-plugins/logstash-input-file/issues/151) (Lost data on rotation).

---

<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: [November 4, 2022, 4:29am UTC](https://discuss.elastic.co/t/file-input-plugin-lost-first-part-of-log-line/61989/3 "2022-11-04T04:29:22Z")

</div>


