LoginSignup
8
8

More than 5 years have passed since last update.

elasticsearch/curatorを使ってみる

Last updated at Posted at 2014-07-22

こちらの投稿に思い切り影響されて、curatorを使うことにした
http://qiita.com/hakobera/items/48e15c4bb4cc8110c495

インストール

https://github.com/elasticsearch/curator
READMEの通り

pip install elasticsearch-curator

使ってみる

現在、
http://qiita.com/hakobera/items/48e15c4bb4cc8110c495
で記載されている方法が使えない模様。
curatorの1.1系から、オプション形式からコマンド形式に変わったぽい

# $ curator --host my-elasticsearch --prefix logstash- -b 2 -c 60 -d 90
# こちらのコマンドは、以下のように書ける
$ curator --host my-elasticsearch bloom --older-than 2 --prefix logstash-
$ curator --host my-elasticsearch close --older-than 60 --prefix logstash-
$ curator --host my-elasticsearch delete --older-than 90 --prefix logstash-

オプションの順序がまあまあ重要らしく、
--host--portなどはcuratorコマンドに対するオプションで、
--older-than--prefixbloomclosedeleteなどのコマンドに対するオプションらしい

curator wiki

dryrun

-nでdry runできるみたい。
これはcuratorに対するオプションとして指定する必要あり

複数コマンド

複数コマンドを一度に実行できないのか?
→できないっぽい。
Combining Arguments

1行にしたければ、シェルの機能でやれ、と。

8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8