I was going to make cronjob to do curator on elasticsearch
0 17 * * * /usr/local/bin/curator_cli --host localhost delete indices --older-than 7 --time-unit days --timestring '\%Y.\%m.\%d' >> /var/log/curator.log 2>&1
It give me error on log
Error: No such command "delete"
Error: no such option: --older-than
What command should replace delete and older than?
Thank you.
So, then I found myself by googling. I am simply using yml to do the task.
0 17 * * * /usr/local/bin/curator /opt/action.yml >> /var/log/curator.log 2>&1
Here is the action.yml:
client:
hosts:
- 127.0.0.1
port: 9200
url_prefix:
use_ssl: False
certificate:
client_cert:
client_key:
ssl_no_validate: False
http_auth:
timeout: 30
master_only: False
logging:
loglevel: INFO
logfile:
logformat: default
blacklist: ['elasticsearch', 'urllib3']