# Logstash problem with Logrotate: Missing out on a lot of logs

**URL:** https://discuss.elastic.co/t/logstash-problem-with-logrotate-missing-out-on-a-lot-of-logs/172496
**Category:** Logstash
**Created:** [March 15, 2019, 9:35am UTC](https://discuss.elastic.co/t/logstash-problem-with-logrotate-missing-out-on-a-lot-of-logs/172496 "2019-03-15T09:35:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![GiteshKhanna](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@GiteshKhanna](https://discuss.elastic.co/u/GiteshKhanna)
#### Post date: [March 15, 2019, 9:35am UTC](https://discuss.elastic.co/t/logstash-problem-with-logrotate-missing-out-on-a-lot-of-logs/172496/1 "2019-03-15T09:35:04Z")

</div>

Hi,

**Problem** : I am missing on alot of logs.

My logrotate config looks like this:

files:  
"/etc/logrotate.d/webapp":  
mode: "000755"  
owner: root  
group: root  
content: |  
/mnt/logs/xx.log {  
missingok  
maxsize 1G  
rotate 1  
compress  
delaycompress  
notifempty  
copytruncate  
postrotate  
INSTANCE=$(curl _some\_endpoint_)  
APP=_app\_name_  
aws s3 _some\_s3\_endpoint_  
endscript  
}

**My log rotate file which gets created is named xx.log-20190315**  
**So even though I am not doing any dateext config in logrotate, by default it is appending date to the log file.**

my logstash config looks like:

input {  
file {  
type =\> "xx\_log"  
path =\> "/mnt/logs/xx.log"  
mode =\> "tail"  
exclude =\> "_.gz"  
start\_position =\> "end"  
sincedb\_path =\> "/root/.xx\_log\_sincedb"  
codec =\> multiline {  
pattern =\> "^%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{TIME}._"  
negate =\> "true"  
what =\> "previous"  
}  
}  
}

**With all of the above configuration, logstash is still missing out on logs(probably because it is not reading the logs of the rotated file)**

**Any kind of help will be appreciated!**

**Thanks.**

---

<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: [April 12, 2019, 9:35am UTC](https://discuss.elastic.co/t/logstash-problem-with-logrotate-missing-out-on-a-lot-of-logs/172496/2 "2019-04-12T09:35:10Z")

</div>

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