我正在使用Elasticsearch Hot Warm体系结构进行大量数据分析。 我的策展人工作将设置从“热”节点到“热”节点超过2天的索引的box_type。但是,当我在9月30日晚上18点运行它时,9月28日索引的box_type仍然很“热”。 我的策展人动作设置:
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.
日志显示操作已完成。 9月28号索引box_type不应该是“暖”的吗?
filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 2
当我在9月30日晚上18点运行该过滤器时,是否会将所有9月28日的索引box_type更改为暖色?
答案 0 :(得分:0)
时间是从当天UTC 00:00 开始计算的时间,而不是从执行时间开始计算的时间,因此older
比2
days
取决于当您的时区为UTC 00:00时。如果启用DEBUG日志记录,则可以在策展人日志文件中查看如何计算和测量时间。