# Is curator delete log files or only delete indices?

**URL:** <https://discuss.elastic.co/t/is-curator-delete-log-files-or-only-delete-indices/213969>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [January 7, 2020, 3:24am UTC](https://discuss.elastic.co/t/is-curator-delete-log-files-or-only-delete-indices/213969 "2020-01-07T03:24:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PiCarODD](https://avatars.discourse-cdn.com/v4/letter/p/71e660/32.png) [@PiCarODD](https://discuss.elastic.co/u/PiCarODD)\
**Post date:** [January 7, 2020, 3:24am UTC](https://discuss.elastic.co/t/is-curator-delete-log-files-or-only-delete-indices/213969/1 "2020-01-07T03:24:42Z")

</div>

Hi,

I need some help with curator.  
Curator delete indices well but my storage increase and increase.

Thanks

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [January 7, 2020, 3:52am UTC](https://discuss.elastic.co/t/is-curator-delete-log-files-or-only-delete-indices/213969/2 "2020-01-07T03:52:03Z")

</div>

Check the size of the /var/log/elasticsearch directory. If you use logstash, also check /var/log/logstash. Curator won't manage those directories and Elastic doesn't ship anything like logrotate configurations.

---

<div class="post-metadata">

**Author:** ![PiCarODD](https://avatars.discourse-cdn.com/v4/letter/p/71e660/32.png) [@PiCarODD](https://discuss.elastic.co/u/PiCarODD)\
**Post date:** [January 8, 2020, 4:31am UTC](https://discuss.elastic.co/t/is-curator-delete-log-files-or-only-delete-indices/213969/3 "2020-01-08T04:31:42Z")

</div>

What is impact if we delete elasticsearch database logs?  
Thanks

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [January 8, 2020, 4:12pm UTC](https://discuss.elastic.co/t/is-curator-delete-log-files-or-only-delete-indices/213969/4 "2020-01-08T16:12:58Z")

</div>

/var/log/elasticsearch logs are not database logs in the sense of mysql recovery logs, they are just messages of events in the past. I delete them after 7 days using a cron job, but I also ingest these using the filebeat elasticsearch module. I keep those for 30 days.

Here's my delete job, for example:

```
#!/bin/bash

stack="{{ES_cluster}}"

find /var/log/elasticsearch/ -type f -name "${stack}_audit-2*.log" -mtime +7 -exec rm {} \;
find /var/log/elasticsearch/ -type f -name "${stack}*.log.gz" -mtime +7 -exec rm {} \;

```

(This is an Ansible template, so there is substitution done when deployed. This method of invoking rm can be dangerous, test well!)

---

<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:** [February 5, 2020, 4:12pm UTC](https://discuss.elastic.co/t/is-curator-delete-log-files-or-only-delete-indices/213969/5 "2020-02-05T16:12:59Z")

</div>

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