# Curator configuration appears to delete too early

**URL:** <https://discuss.elastic.co/t/curator-configuration-appears-to-delete-too-early/144554>\
**Category:** Logstash\
**Created:** [August 15, 2018, 5:16pm UTC](https://discuss.elastic.co/t/curator-configuration-appears-to-delete-too-early/144554 "2018-08-15T17:16:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandipatmca](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@sandipatmca](https://discuss.elastic.co/u/sandipatmca)\
**Post date:** [August 15, 2018, 5:16pm UTC](https://discuss.elastic.co/t/curator-configuration-appears-to-delete-too-early/144554/1 "2018-08-15T17:16:07Z")

</div>

Issue: Current configuration of “ **unit\_count”** in action.yml file is 180 days but when this file is invoked the logs are not getting deleted as per configured values. As per current configuration(unit\_count=180 days) , all the logs files before 180 should get deleted but in actual the logs files before 180 days are also getting deleted. Below is how action.yml file looks like

* * *

actions:  
1:  
action: delete\_indices  
description: \>-  
Delete indices older than 180 days (based on index name), for logstash-  
prefixed indices. Ignore the error if the filter does not result in an  
actionable list of indices (ignore\_empty\_list) and exit cleanly.  
options:  
ignore\_empty\_list: True  
timeout\_override:  
continue\_if\_exception: False  
disable\_action: False  
filters:  
- filtertype: pattern  
kind: prefix  
value: logstash-  
exclude:  
- filtertype: age  
source: name  
direction: older  
timestring: '%Y.%m.%d'  
unit: days  
unit\_count: 180  
exclude:

* * *

But data is being deleted that is younger than that.

Can somone suggest is that the right configuration

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [August 15, 2018, 6:13pm UTC](https://discuss.elastic.co/t/curator-configuration-appears-to-delete-too-early/144554/2 "2018-08-15T18:13:38Z")

</div>

Can you share the logs that show what's happening? It would be best if it was DEBUG level logs, as those actually show the time and date comparisons and why they were selected for deletion.

---

<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:** [September 12, 2018, 6:13pm UTC](https://discuss.elastic.co/t/curator-configuration-appears-to-delete-too-early/144554/3 "2018-09-12T18:13:40Z")

</div>

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