Problem with Deleting old indices using curator


Trying to delete old indices using curator. I have indices in the following format:
{name}-{%m%d}. For example: "john-0709" or "jane-0702". Here is my action file:

action: delete_indices

           # - filtertype: pattern
           # kind: prefix
           # value: .kibana
          #  exclude:  True

          - filtertype: pattern
            kind: prefix
            value: john

          - filtertype: age
            source: name
            direction: older
            timestring: '%m%d'
            unit: days
            unit_count: 10

However, it ends up deleting all indices (--dry-run) irrespective of the date.
What am I missing?

(Aaron Mildenstein) #2

I suggest running with a DEBUG loglevel and run with --dry-run again. It will provide the UNIX epoch time stamps in the log files, and why it says index x is older than your set point.


curator --debug loglevel --config ~curator.yml ~/tmp/del_old_indices.yml --dry-run
gives me an error. Is that the right usage?

(Aaron Mildenstein) #4

loglevel is set in the curator.yml file:

  loglevel: DEBUG

(andy_zhou) #5

source: creation_date

(Aaron Mildenstein) #6

creation_date may help. If the indices were not created at the same time as the dates indicated in the index names, it will not, however. That's why I suggested debug logging first.

(system) #7

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