How to open indices for last 30 days only

Hi,

Using curator or any other way , how can i open indices for last 30 days only.

--
Niraj

Below is an example curator action file that looks at the index name, and uses that to determine age. Note the format below is YYYY-MM-DD (2018-04-21)

If you don't have timestamps in the index name, you can change the source to created_date, and drop the timestring option.

Make sure you run curator with --dry-run to verify it's going to do what you want.

actions:
    1:
        action: open
        description: >-
            Opens the last 30 days of indices based on YYYY-MM-DD timestamp in index name
        options:
            continue_if_exception: false
        filters:
        - filtertype: age
          source: name
          timestring: '%Y-%m-%d'
          direction: younger
          unit: days
          unit_count: 30
1 Like

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