How to open indices for last 30 days only


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


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.

        action: open
        description: >-
            Opens the last 30 days of indices based on YYYY-MM-DD timestamp in index name
            continue_if_exception: false
        - 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.