スキップしてメイン コンテンツに移動

投稿

ラベル(delete)が付いた投稿を表示しています

ElasticsearchのIndexのメンテナンスツールであるCuratorの使い方メモ

詳細は オフィシャルのドキュメント を参照してもらうとして、使い方は下記になります。 # --configでどのElasticsearchを参照するかを指定 # 最後の引数のactions.ymlで何日前のインデックスを消すかなどを設定 curator --config /etc/curator/curator.yml /etc/curator/actions.yml 下記はcurator.ymlの例です。 client: hosts: - http://elasticsearch-host.com/ port: 9200 url_prefix: use_ssl: False certificate: client_cert: client_key: ssl_no_validate: False http_auth: user:password timeout: 30 master_only: False logging: loglevel: INFO logfile: logformat: default blacklist: ['elasticsearch'] 下記はactions.ymlの例です。 actions: 1: action: delete_indices description: >- logstash-で始まり、30日より古いインデックスを削除 options: ignore_empty_list: True disable_action: True filters: - filtertype: pattern kind: prefix value: logstash- - filtertype: age source: name direction: older timestring: '%Y.%m.%d' unit: days unit_count: 30