Hello,
I have a index and mapping like this:
{
"_index": "user",
"_type": "profile",
"_id": "2",
"_score": 1,
"_source": {
"full_name": "Elon Musk",
"bio": "Elon Reeve Musk is a Canadian-American entrepreneur, engineer, inventor and investor. He is the CEO and CTO of SpaceX, CEO and product architect of Tesla Motors, and chairman of SolarCity.",
"age": 43,
"location": "37.7749290,-122.4194160",
"enjoys_coffee": false,
"created_on": "2015-05-02T15:45:10.000-04:00"
}
},
I want to delete indices that older than 5 days using curator, below are my config.yml and action.yml.
<config.yml>
client:
hosts: ["127.0.0.1:9200"]
url_prefix:
use_ssl: False
certificate:
client_cert:
client_key:
aws_key:
aws_secret_key:
aws_region:
ssl_no_validate: False
http_auth:
timeout: 30
master_only: False
logging:
loglevel: INFO
logfile:
logformat: default
blacklist: ['elasticsearch', 'urllib3']
<action.yml>
actions:
1:
action: delete_indices
description: "Delete indices older than 1 days (based on index name), for logstash- prefixed indices.
Ignore the error if the filter does not result in an actionable list of indices (ignore_empty_list) and exit cleanly"
options:
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: user-
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y-%m-%d'
unit: days
unit_count: 1
exclude:
I run this command: curator --config ~/Desktop/curator-4.2.6/config.yml ~/Desktop/curator-4.2.6/action.yml on my Mac terminal, but it gives me this error: ERROR Unable to complete action "delete_indices". No actionable items in list: <class 'curator.exceptions.NoIndices'>
Anyone can help me please, I'm a beginner on curator, thanks.