# Lost logs with logrotate

**URL:** https://discuss.elastic.co/t/lost-logs-with-logrotate/138400
**Category:** Logstash
**Created:** [July 3, 2018, 1:28pm UTC](https://discuss.elastic.co/t/lost-logs-with-logrotate/138400 "2018-07-03T13:28:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![elk2](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@elk2](https://discuss.elastic.co/u/elk2)
#### Post date: [July 3, 2018, 1:28pm UTC](https://discuss.elastic.co/t/lost-logs-with-logrotate/138400/1 "2018-07-03T13:28:34Z")

</div>

I have a logstash process that writes a log file ( syslog.log) and a logstash process that reads the log file.  
When logrotate starts, it changes the filename into syslog-[date].log and some logs that aren't read yet from second logstash process are lost . The conf file of second logstash process is like this

```
input{
  file{
    type => "syslog"
    codec => "json"
    path => "/var/log/syslog.log"
    start_position => "beginning"
    sincedb_path => "/var/log/logstash/sincedb/.sincedb_syslog"
   }
....

```

I tried to increase batch and workers of second logstash process but I lost anyway logs.  
Any suggest?

---

<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: [July 31, 2018, 1:28pm UTC](https://discuss.elastic.co/t/lost-logs-with-logrotate/138400/2 "2018-07-31T13:28:36Z")

</div>

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