# Elasticsearch curator not deleting indices

**URL:** <https://discuss.elastic.co/t/elasticsearch-curator-not-deleting-indices/110253>\
**Category:** Elasticsearch\
**Created:** [December 5, 2017, 5:48am UTC](https://discuss.elastic.co/t/elasticsearch-curator-not-deleting-indices/110253 "2017-12-05T05:48:31Z")\
**Posts on this page:** 4\
**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:** [December 5, 2017, 5:48am UTC](https://discuss.elastic.co/t/elasticsearch-curator-not-deleting-indices/110253/1 "2017-12-05T05:48:31Z")

</div>

Here's our actionfile 🙂

```auto
actions:
  1:
    action: delete_indices
    description: >-
      Delete indices older than 3 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
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: eside-
    - filtertype: age
      source: name
      direction: older
      timestring: '%YYYY.%mm.%dd'
      unit: days
      unit_count: 3

```

The after running the curator, here's the debug msgs 🙂

```auto
2017-12-05 06:49:03,357 DEBUG curator.indexlist filter_by_age:431 Filtering indices by age
2017-12-05 06:49:03,357 DEBUG curator.indexlist _get_name_based_ages:229 Getting ages of indices by "name"
2017-12-05 06:49:03,357 DEBUG curator.indexlist empty_list_check:184 Checking for empty list
2017-12-05 06:49:03,357 DEBUG curator.utils get_date_regex:195 regex = \d{4}YYY\.\d{2}m\.\d{2}d
2017-12-05 06:49:03,358 DEBUG curator.indexlist working_list:195 Generating working list of indices
2017-12-05 06:49:03,358 DEBUG curator.indexlist working_list:195 Generating working list of indices
2017-12-05 06:49:03,358 DEBUG curator.indexlist filter_by_age:492 Index "eside-2017.08.21" does not meet provided criteria. Removing from list.
2017-12-05 06:49:03,358 DEBUG curator.indexlist filter_by_age:492 Index "test-20171127-logstash-1" does not meet provided criteria. Removing from list.

```

Help please ☹

---

<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:** [December 5, 2017, 6:19am UTC](https://discuss.elastic.co/t/elasticsearch-curator-not-deleting-indices/110253/2 "2017-12-05T06:19:36Z")

</div>

First, please properly encapsulate your config file within triple back ticks, like this:

````
```
PASTED CONTENT HERE
```

````

It's nearly impossible to tell if YAML is properly formatted if this isn't done.

That said, however, it appears that you have unnecessary extra characters and in your timestring. It should be `timestring: '%Y.%m.%d'`. Extra characters are needed in Logstash, perhaps, but not Curator.

---

<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:** [December 5, 2017, 7:10am UTC](https://discuss.elastic.co/t/elasticsearch-curator-not-deleting-indices/110253/3 "2017-12-05T07:10:58Z")

</div>

Thank you so much, that was quick! Also for the formatting \<3

---

<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:** [January 2, 2018, 7:11am UTC](https://discuss.elastic.co/t/elasticsearch-curator-not-deleting-indices/110253/4 "2018-01-02T07:11:21Z")

</div>

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