# Curator Filters for a Weekly and Monthly Indices Created

**URL:** https://discuss.elastic.co/t/curator-filters-for-a-weekly-and-monthly-indices-created/123050
**Category:** Elasticsearch
**Created:** [March 8, 2018, 11:07am UTC](https://discuss.elastic.co/t/curator-filters-for-a-weekly-and-monthly-indices-created/123050 "2018-03-08T11:07:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![\_kyllr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/_kyllr/32/27610_2.png) [@\_kyllr](https://discuss.elastic.co/u/_kyllr)
#### Post date: [March 8, 2018, 11:07am UTC](https://discuss.elastic.co/t/curator-filters-for-a-weekly-and-monthly-indices-created/123050/1 "2018-03-08T11:07:08Z")

</div>

Hi,

How do I configure delete\_indices.yml for filters for a weekly and monthly indices created in Elasticsearch?  
I am using curator to delete indices for the past 6 months using source: name.

Tried this for the monthly!

```
- filtertype: age
  source: name
  direction: older
  timestring: '%Y.%m'
  unit: months
  unit_count: 6

```

How about for the weekly?

Any thoughts?

Thanks!

---

<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: [March 8, 2018, 3:12pm UTC](https://discuss.elastic.co/t/curator-filters-for-a-weekly-and-monthly-indices-created/123050/2 "2018-03-08T15:12:30Z")

</div>

More information is needed. The problem is that [weeks and years are both 2 digit numbers](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.4/fe_timestring.html#_strftime). You will have to use another criteria to identify which indices are in weeks, and which are in months.

---

<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: [April 5, 2018, 3:12pm UTC](https://discuss.elastic.co/t/curator-filters-for-a-weekly-and-monthly-indices-created/123050/3 "2018-04-05T15:12:38Z")

</div>

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