# How to collect logstash logs without filling hard drive?

**URL:** <https://discuss.elastic.co/t/how-to-collect-logstash-logs-without-filling-hard-drive/38345>\
**Category:** Logstash\
**Created:** [January 4, 2016, 8:15pm UTC](https://discuss.elastic.co/t/how-to-collect-logstash-logs-without-filling-hard-drive/38345 "2016-01-04T20:15:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spuder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spuder/32/44895_2.png) [@spuder](https://discuss.elastic.co/u/spuder)\
**Post date:** [January 4, 2016, 8:15pm UTC](https://discuss.elastic.co/t/how-to-collect-logstash-logs-without-filling-hard-drive/38345/1 "2016-01-04T20:15:18Z")

</div>

Occasionally I get a log message that logstash can't parse. Usually it is because the filename is invalid. Sometimes it is because my elasticsearch mappings are incorrect.

I want to collect these logs so I can take action on renaming the field.

I've tried using filebeat and pointing it at /var/log/logstash\_server.log. While that works, if a log file is encountered that has the wrong mapping, and it can't be uploaded to elasticsearch, it logs back to the file. Creating a loop.

How can you get logstash logs into elasticsearch without the risk of loops?

---

<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 6, 2017, 5:16am UTC](https://discuss.elastic.co/t/how-to-collect-logstash-logs-without-filling-hard-drive/38345/2 "2017-07-06T05:16:54Z")

</div>

Closed on July 6, 2017, 5:16am UTC


