# Log rotate not working

**URL:** <https://discuss.elastic.co/t/log-rotate-not-working/120409>\
**Category:** Logstash\
**Created:** [February 19, 2018, 8:07am UTC](https://discuss.elastic.co/t/log-rotate-not-working/120409 "2018-02-19T08:07:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![inhinyera16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inhinyera16/32/61625_2.png) [@inhinyera16](https://discuss.elastic.co/u/inhinyera16)\
**Post date:** [February 19, 2018, 8:07am UTC](https://discuss.elastic.co/t/log-rotate-not-working/120409/1 "2018-02-19T08:07:22Z")

</div>

Hello everyone.

I came with this scenario just recently.

Before i install xpack, logstash can log rotate my logs in /var/log/logstash directory. Upon checking just recently, i noticed that my last log file was logstash-plain-2018-02-18.log and logs from then was written in logstash-plain.log. Btw, we do have CRON job to retain only past 3 days of logs.

Here's our logstash.yml

```
config.reload.automatic: true
path.config: /etc/logstash/conf.d/*.conf
path.data: /var/lib/logstash
path.logs: /var/log/logstash
pipeline.output.workers: 3
pipeline.workers: 6
queue.max_events: 1000
queue.type: persisted
queue.max_bytes: 8gb

```

Can someone tell my whats the possible reason behind this?

---

<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:** [March 19, 2018, 8:07am UTC](https://discuss.elastic.co/t/log-rotate-not-working/120409/2 "2018-03-19T08:07:30Z")

</div>

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