[solved]I want to delete the indices that are older than 1 day?

i used curator 4.2.6 . I want to delete the indices that are 1 day older. I used the following command:

CONFIG file
client:
hosts:
- 127.0.0.1
port: 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 file
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: data
    exclude:
  • filtertype: age
    source: name
    direction: older
    timestring: '%Y-%m-%d'
    unit: days
    unit_count: 1
    exclude:

my index is in this format data-2017-03-01

I am getting error like this:

F:\Curator\curator-4.2.6-win32>curator --config F:\Curator\curator-4.2.6-win32\config.yml F:\Curator\curator-4.2.6-win32\action.yml
2017-03-04 00:48:15,217 ERROR     Schema error: extra keys not allowed @ data[1]
Configuration: Actions File: Location: root: Bad Value: "None", extra keys not allowed @ data[1]. Check configuration file.

Thanks..

Please encapsulate your yaml files in lines containing only triple backticks ```
One above your text, and one below. Without this, I can't tell if your files are properly indented.

The first thing that jumps out is that you can't have a multiline description unless you start with description: ->

See the example for delete_indices in the Official Curator Documentation

Thanks..
I COPIED the config file from github and pasted as it is in config file.
I will correct the description and let u know..
Thanks

The issue isn't the config file, it is the action file.

Thanks .. i got it

For sending the last 3 day indices to snapshot in azure, do i have to provide azure account name and number in config file?

OR is it enough to declare them in elasticsearch.yml file because i am using azure plugin?
Thanks

Please keep the discussion on topic. The topic is deleting indices older than 1 day. Snapshots and Azure do not enter in to such a discussion.

sorry..got that

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.