Выделение куратором не изменяет настройку ES index box_type с «горячего» на «теплый» - PullRequest
0 голосов
/ 01 октября 2018

Я использую Elasticsearch Hot Warm Architecture для анализа больших объемов данных.Моя работа куратора установит для box_type индексы старше 2 дней от «горячих» до «теплых» узлов.Но когда я запускаю его в 18:00, 30 сентября, индекс box_type от 28 сентября все еще «горячий».Моя настройка куратора:

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-

Журналы:

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.

Журналы говорят, что действие завершено.Разве 28-е число индексов сентября box_type не должно быть «теплым»?

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

Изменяет ли этот фильтр все индексы 28-го сентября box_type, чтобы он нагревался, когда я запускаю его в 18:00, 30 сентября?

1 Ответ

0 голосов
/ 02 октября 2018

Время измеряется с UTC 00:00 текущего дня, не с момента исполнения, поэтому older чем 2 days будет зависеть от того, когда UTC 00:00 находится вваш часовой пояс.Вы можете увидеть, как время вычисляется и измеряется в файлах журнала куратора, если вы включили ведение журнала DEBUG.

...