Curator Allocation action does not change ES index box_type setting from "hot" to "warm"

514 Views Asked by At

I'm using Elasticsearch Hot Warm Architecture for large time data analytics. My curator job will set box_type of indices older than 2 days from "hot" to "warm" nodes. But when I run it at 18pm, 30th september, the 28th september indices' box_type is still "hot". My curator action setting:

actions:
  1:
    action: open
    description: Open indices younger than warm days (based on index name), for logstash-
      prefixed indices.
    options:
      ignore_empty_list: true
      disable_action: false
    filters:
    - filtertype: age
      source: name
      direction: younger
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 30
    - filtertype: pattern
      kind: prefix
      value: logstash-
      exclude:

  2:
    action: allocation
    description: Apply shard allocation to hot nodes
    options:
      key: box_type
      value: hot
      allocation_type: require
      wait_for_completion: true
      timeout_override:
      continue_if_exception: false
      ignore_empty_list: true
      disable_action: false
    filters:
    - filtertype: age
      source: name
      direction: younger
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2
    - filtertype: pattern
      kind: prefix
      value: logstash-

  3:
    action: allocation
    description: Apply shard allocation to warm nodes
    options:
      key: box_type
      value: warm
      allocation_type: require
      wait_for_completion: true
      timeout_override:
      continue_if_exception: false
      ignore_empty_list: true
      disable_action: false
    filters:
    - filtertype: age
      source: name
      direction: younger
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 30
    - filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2
    - filtertype: pattern
      kind: prefix
      value: logstash-

Logs:

2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Action ID: 1, "open" completed.
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Preparing Action ID: 2, "allocation"
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Trying Action ID: 2, "allocation": Apply shard allocation to hot nodes
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Updating index setting {'index.routing.allocation.require.box_type': 'hot'}
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Health Check for all provided keys passed.
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Action ID: 2, "allocation" completed.
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Preparing Action ID: 3, "allocation"
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Trying Action ID: 3, "allocation": Apply shard allocation to warm nodes
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Updating index setting {'index.routing.allocation.require.box_type': 'warm'}
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Health Check for all provided keys passed.
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Health Check for all provided keys passed.
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Health Check for all provided keys passed.
2018-09-30 18:38:26,053 - curator.py:55 - INFO -  Action ID: 3, "allocation" completed.

The logs say the action is completed. Shouldn't 28th of sept indices box_type be "warm"?

filtertype: age
      source: name
      direction: older
      timestring: '%Y.%m.%d'
      unit: days
      unit_count: 2

Does this filter change all the 28th sept indices box_type to warm when I run it at 18PM, 30th of sept?

1

There are 1 best solutions below

3
On

Time is measured from UTC 00:00 of the current day, not from the time of execution, so older than 2 days would depend on when UTC 00:00 is in your time zone. You can see how the time is calculated and measured in the curator log files if you enable DEBUG logging.