Delete 3 days older indices from elasticsearch

Hi.

I want to delete the 5 days older indices from elasticsearch. I have gone through the some elastic community links . Found the best way for this on this link: https://stackoverflow.com/questions/33430055/removing-old-indices-in-elasticsearch/42268400#42268400

So downloaded curator for windows from :https://www.elastic.co/guide/en/elasticsearch/client/curator/4.2/windows-zip.html

After this : I have created the config.yml and action.yml file as follows:

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: "/root/curator/logs/actions.log"
logformat: default
blacklist: ['elasticsearch', 'urllib3']

actions:
1:
action: delete_indices
description: >-
Delete indices older than 3 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:
ignore_empty_list: True
timeout_override:
continue_if_exception: False
disable_action: False
filters:
- filtertype: pattern
kind: prefix
value: logstash-
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 3
exclude:

  actions:

And I am running the command : $ curater --config C:/ElasticSearch/curator-4.2.6-win32/config.yml C:/ElasticSearch/curator-4.2.6-win32/action.yml

But it gives me the error : bash: curater: command not found

It's spelled curator, rather than curater

Additionally, if you installed Curator for windows, it won't be runnable in Bash for Windows, but rather in 'CMD` or Powershell

Sorry for the typo but still the same error : $ curator --config C:/ElasticSearch/curator-4.2.6-win32/config.yml C:/ElasticSearch/curator-4.2.6-win32/action.yml
bash: curator: command not found

I can not run the cmd on my machine ,I don't have access . so I am using the bash cmd . The ElasticSearch , kibana and logstash are working fine on my machine . How can I run the curator in the same way , I am running Eelastic and all?

You would need to install the DEB version there, or install Python inside Bash for windows, and install via pip there.

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