Hello,
after we upgraded to 6.2.4 we are having really odd issue only on 1 production cluster. I'm getting empty list of indices where there are clearly indices which suits the condition. Whats more it works on test environment in the same setup.
If I don't use "ignore empty list" option it does throw an error. For filtertype pattern i have used prefix and regex, both the same outcome. Action.yml was copied from test environment where it works so I avoid any typos, still the same. Curator version is 5.5.4. Any ideas pls? Thx
Works:
5:
action: alias
description: "Add/Remove selected indices to or from the specified alias"
options:
name: analytics
warn_if_no_indices: False
ignore_empty_list: True
continue_if_exception: True
disable_action: False
add:
filters:
- filtertype: pattern
kind: regex
value: '^analytics'
- filtertype: age
source: name
direction: younger
timestring: '%Y.%W'
unit: weeks
unit_count: 2
exclude:
remove:
filters:
- filtertype: pattern
kind: regex
value: '^analytics'
- filtertype: age
source: name
direction: older
timestring: '%Y.%W'
unit: weeks
unit_count: 2
exclude:
_cat/indices/analytics*
green open analytics-2019.06w-000001 0OQfVY5vRXihtIUOEco1hA 4 1 558191086 0 325.3gb 162.6gb
green open analytics-2019.06w-000002 qXJyu__tTISNrjlItksQCw 4 1 199601308 0 109.6gb 54.7gb
green open analytics-2019.07w-000001 gTv6ksskRj20pOGJZJT9wQ 4 1 433071540 0 258.3gb 130.4gb
log:
2019-02-13 17:04:48,581 INFO Trying Action ID: 5, "alias": Add/Remove selected indices to or from the specified alias
2019-02-13 17:04:50,246 INFO Updating aliases...
2019-02-13 17:04:50,246 INFO Alias actions: {'actions': [{'add': {'index': 'analytics-2019.05w-000001', 'alias': 'analytics'}}, {'add': {'index': 'analytics-2019.07w-000001', 'alias': 'analytics'}}, {'add': {'index': 'analytics-2019.05w-000002', 'alias': 'analytics'}}, {'add': {'index': 'analytics-2019.06w-000002', 'alias': 'analytics'}}, {'add': {'index': 'analytics-2019.06w-000001', 'alias': 'analytics'}}]}
2019-02-13 17:04:50,268 INFO Action ID: 5, "alias" completed.
Doesn't work:
6:
action: alias
description: "Add/Remove selected indices to or from the specified alias"
options:
name: audit
warn_if_no_indices: False
ignore_empty_list: True
continue_if_exception: True
disable_action: False
add:
filters:
- filtertype: pattern
kind: prefix
value: audit-
- filtertype: age
source: name
direction: younger
timestring: '%Y.%m'
unit: months
unit_count: 2
exclude:
remove:
filters:
- filtertype: pattern
kind: prefix
value: audit-
- filtertype: age
source: name
direction: older
timestring: '%Y.%m'
unit: months
unit_count: 2
exclude:
_cat/indices/audit*
green open audit-2018 I5Rr-1I_S5iF-k14QBWgmw 4 1 181787694 135286044 177.5gb 88.7gb
green open audit-2019.02 yTDMLejxQJWtBA9ttbwpJw 4 1 8643326 0 16.6gb 8.3gb
green open audit-2019.01 hPMhiPSBRFCLsIy0Vn09Lw 4 1 30760434 100 42gb 21gb
logs:
2019-02-13 17:04:50,268 INFO Preparing Action ID: 6, "alias"
2019-02-13 17:04:50,319 INFO Trying Action ID: 6, "alias": Add/Remove selected indices to or from the specified alias
2019-02-13 17:04:50,667 INFO Skipping action "alias" due to empty list: <class 'curator.exceptions.NoIndices'>
2019-02-13 17:04:50,668 INFO Action ID: 6, "alias" completed.
2019-02-13 17:04:50,668 INFO Job completed.