Curator don't delete indices

curator
(Влад Радин) #1

Hi, I want to delete old indices in elastic. But it not working.

Index dem.nisr-2019.05.13 is actionable and remains in the list.
Remains in actionable list: Index "dem.nisr-2019.05.13" age (1557705600), direction: "older", point of reference, (1557819602)

Filtering indices with index.lifecycle.name
Index dem.nisr-2019.05.13 is actionable and remains in the list.
Remains in actionable list: index.lifecycle.name is not set for index dem.nisr-2019.05.14
DRY-RUN MODE.  No changes will be made.
(CLOSED) indices may be shown that may not be acted on by action "close".
DRY-RUN: close: dem.nisr-2019.05.13 with arguments: {'delete_aliases': False}

But it's no one indices, it's more.

My action.yml

actions:
  1:
    action: close
    description: >-
      Close indices older than 2 days (based on index name).
    options:
      ignore_empty_list: True
      delete_aliases: False
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: prd.rnis-
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2

  2:
    action: delete_indices
    description: >-
      Delete indices older than 2 days (based on index name).
    options:
      ignore_empty_list: True
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: prd.rnis-
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2

  3:
    action: close
    description: >-
      Close indices older than 2 days (based on index name).
    options:
      ignore_empty_list: True
      delete_aliases: False
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: dem.nisr-
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2

  4:
    action: delete_indices
    description: >-
      Delete indices older than 2 days (based on index name).
    options:
      ignore_empty_list: True
      disable_action: False
    filters:
    - filtertype: pattern
      kind: prefix
      value: dem.nisr-
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2
(Aaron Mildenstein) #2

I'm not sure I follow your problem. It appears you are running with the --dry-run flag. Nothing will be deleted or closed with this flag present. It means, "show me what you would have done without actually doing it." Perhaps re-run without the flag?

(Влад Радин) #3

Yes, it workin. Thnx!