Hello All,
I need to remove all the indexes older than 6 days automatically, I tried to create a lifecycle in Kibana but it didn't work fine, so i saw an option called Curator but for some reason, the curator can't find the indexes.
The indexed are:
curator_cli --config /home/elkadmin/curator/curator-cfg.yml show_indices | grep cisco-asa
cisco-asa-2020.06.23
cisco-asa-2020.06.24
cisco-asa-2020.06.25
cisco-asa-2020.06.26
cisco-asa-2020.06.27
cisco-asa-2020.06.28
cisco-asa-2020.06.29
cisco-asa-2020.06.30
I installed version 5.8 in one of my data nodes.
This is the config file:
curator-cfg.yml
client:
hosts:
- 10.70.4.142
- 10.70.4.143
port: 9200
logging:
loglevel: INFO
logfile:
logformat: default
blacklist: ['elasticsearch', 'urllib3']
Action - curator-action-delete.yml
actions:
1:
action: delete_indices
description: >-
Delete old indexes.
options:
ignore_empty_list: True
timeout_override: 30
filters:
- filtertype: pattern
kind: prefix
value: cisco-asa-
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 5
output
/usr/bin/curator /home/elkadmin/curator/curator-action-delete.yml --config /home/elkadmin/curator/curator-cfg.yml
2020-06-30 09:51:27,976 INFO Preparing Action ID: 1, "delete_indices"
2020-06-30 09:51:27,976 INFO Creating client object and testing connection
2020-06-30 09:51:27,980 INFO Instantiating client object
2020-06-30 09:51:27,981 INFO Testing client connectivity
2020-06-30 09:51:27,984 INFO Successfully created Elasticsearch client object with provided settings
2020-06-30 09:51:27,987 INFO Trying Action ID: 1, "delete_indices": Delete old indexes.
2020-06-30 09:51:28,222 INFO Skipping action "delete_indices" due to empty list: <class 'curator.exceptions.NoIndices'>
2020-06-30 09:51:28,222 INFO Action ID: 1, "delete_indices" completed.
2020-06-30 09:51:28,222 INFO Job completed.