mkdir config action微信
vi config/config.ymlelasticsearch
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: 36000 master_only: False logging: loglevel: INFO logfile: logformat: default blacklist: ['elasticsearch', 'urllib3']
vi action.ymlide
actions: 1: action: delete_indices description: "Delete indices older than 10 days (based on index name), for logstash- prefixed indices." options: timeout_override: continue_if_exception: False disable_action: False filters: - filtertype: pattern kind: prefix value: logstash- - filtertype: age source: name direction: older unit: days unit_count: 10 timestring: '%Y.%m.%d' exclude:
vi curator-manage-index.shurl
#!/bin/sh curator --config /home/elasticsearch/curator-5.2.0/config/config.yml /home/elasticsearch/curator-5.2.0/action/action.yml
crontab -ecode
0 1 * * * /home/elasticsearch/curator-5.2.0/curator-manage-index.sh
技術分享離不開您的支持,您的支持是我源源不斷的動力。orm