配置文件内容如下:
[root@hdp-002 actions]# cat /root/.curator/actions/delete_indices.yml
---
# Remember, leave a key empty if there is no value.  None will be a string,
# not a Python "NoneType"
#
# Also remember that all examples have 'disable_action' set to True.  If you
# want to use this action as a template, be sure to set this to False after
# copying it.
actions:
  1:
    action: delete_indices
    description: >-
      Delete indices older than 30 days (based on index name), for rc- prefixed indices.
    options:
      ignore_empty_list: True
      timeout_override:
      continue_if_exception: False
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: rc-
      exclude:
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 30
      exclude:
  2:
    action: delete_indices
    description: >-
      
      Delete indices older than 30 days (based on index name), for prod- prefixed indices.
    options:
      ignore_empty_list: True
      timeout_override:
      continue_if_exception: False
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: prod-
      exclude:
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 30
      exclude:

删除以prod-前缀且是30天之前的索引

[root@hdp-002 actions]# curator --help

Usage: curator [OPTIONS] ACTION_FILE


  Curator for Elasticsearch indices.


  See http://elastic.co/guide/en/elasticsearch/client/curator/current


Options:

  --config PATH  Path to configuration file. Default: ~/.curator/curator.yml

  --dry-run      Do not perform any changes.

  --version      Show the version and exit.

  --help         Show this message and exit.