どうも、cloudpack の かっぱ(@inokara)です。 はじめに Elasticsearch はカジュアルにログを溜めることが出来て、検索も可視化もらっく楽ですがインデックスのメンテナンスはちゃんとしたいところです。ということで、 Elasticsearch の API の復習を兼ねて Ruby で作ってみました。 es-index-maintence Index API はじめに 使っているのは以下の二つの API です。 indices exists delete index indices exists で削除対象となるインデックスが存在していたら delete index を利用して削除します。 とても簡単ですな。とは言え、一応、二つの API を叩いてみましょう。 indices exists HEAD メソッドを利用します。 curl -XHEAD 'http://l