# Curator Older Than configuration does not work

**URL:** https://discuss.elastic.co/t/curator-older-than-configuration-does-not-work/128190
**Category:** Elasticsearch
**Created:** [April 16, 2018, 1:03pm UTC](https://discuss.elastic.co/t/curator-older-than-configuration-does-not-work/128190 "2018-04-16T13:03:32Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![tchoum](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@tchoum](https://discuss.elastic.co/u/tchoum)
#### Post date: [April 16, 2018, 1:03pm UTC](https://discuss.elastic.co/t/curator-older-than-configuration-does-not-work/128190/1 "2018-04-16T13:03:33Z")

</div>

Hello,

I' m trying to delete logs older than 10 days within an indice, based on the timestamp of my logs indice, but it does not seem to work as curator seems to delete logs older than 5 days instead,

The name of my indice is as follow : indice-2018.04

Structure of this indice contains following fields :

@timestamp April 14th 2018, 19:07:01.000

And in curator my configuration is :

```
  2:
action: delete_indices
description: >-
  blabla
options:
  ignore_empty_list: True
  timeout_override:
  continue_if_exception: False
  disable_action: False
filters:
- filtertype: pattern
  kind: prefix
  value: indice-
  exclude:
- filtertype: age
  source: field_stats
  field: '@timestamp'
  stats_result: min_value
  direction: older
  unit: days
  unit_count: 10
  exclude:

```

Could you me seing what is wrong there?

---

<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: [April 16, 2018, 1:27pm UTC](https://discuss.elastic.co/t/curator-older-than-configuration-does-not-work/128190/2 "2018-04-16T13:27:15Z")

</div>

If you run with `--dry-run` and `loglevel: DEBUG` you'll see everything, including the calculated time values. Those log lines will be important to help figure out what's happening.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [April 16, 2018, 1:27pm UTC](https://discuss.elastic.co/t/curator-older-than-configuration-does-not-work/128190/3 "2018-04-16T13:27:37Z")

</div>

Curator manages retention by deleting complete indices, not individual documents within an index. Based on your index name it looks like you are using monthly indices, so I do not see how you will be able to delete just data that is older than 10 days with this.

---

<div class="post-metadata">

### Author: ![tchoum](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@tchoum](https://discuss.elastic.co/u/tchoum)
#### Post date: [April 16, 2018, 2:43pm UTC](https://discuss.elastic.co/t/curator-older-than-configuration-does-not-work/128190/4 "2018-04-16T14:43:26Z")

</div>

Thx, indeed I was asking me the question,

I thought thas as curator can be configurated to delete "objects" based on timestamp, it would be on logs timestamp, therefore it could only delete logs older than ...

So you are saying to me that curator can only delete complete indices.

is there another solution to delete only specific logs of a dedicated indice? or do I have no other choice than having daily indices?

---

<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: [April 16, 2018, 2:47pm UTC](https://discuss.elastic.co/t/curator-older-than-configuration-does-not-work/128190/5 "2018-04-16T14:47:16Z")

</div>

You should not be deleting from an index if you are using time-series data. Retention should be managed by dropping entire indices, rather than trying to delete from an index. The "drop" is a single operation, while the delete from is millions of atomic operations, which is extremely taxing for the I/O operations of each node that has a shard for that index.

If you need to be able to search across multiple indices to cover all of the data you have, use aliases, or index patterns to search across all indices.

---

<div class="post-metadata">

### Author: ![tchoum](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@tchoum](https://discuss.elastic.co/u/tchoum)
#### Post date: [April 17, 2018, 7:33am UTC](https://discuss.elastic.co/t/curator-older-than-configuration-does-not-work/128190/6 "2018-04-17T07:33:48Z")

</div>

Ok thanks for your answer,

I already have an index pattern matching the prefix "indice-",

So maybe I could start adding indexes containing also day date, and I would then be able to delete only indexes older than 10 days,

It shouldnt break my index pattern if I do it that way dont you think?

---

<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: [April 17, 2018, 11:55am UTC](https://discuss.elastic.co/t/curator-older-than-configuration-does-not-work/128190/7 "2018-04-17T11:55:56Z")

</div>

No. It wouldn't.

---

<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: [May 15, 2018, 11:56am UTC](https://discuss.elastic.co/t/curator-older-than-configuration-does-not-work/128190/8 "2018-05-15T11:56:01Z")

</div>

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