curatorのバージョンは4.1.1です。
調べたら以下のコマンドで古いログは削除できるみたいですが、できませんでした(バージョンのせい?)。
オプション事体見つからないということなので、その後に--helpでオプションを確認
#curator --host https://search-[domain].ap-northeast-1.es.amazonaws.com delete indices --prefix logstash-* --older-than 30 --time-unit days --timestring %Y.%m.%d` Error: no such option: --host #curator --help Usage: curator [OPTIONS] ACTION_FILE Curator for Elasticsearch indices. See http://elastic.co/guide/en/elasticsearch/client/curator/current Options: --config PATH Path to configuration file. Default: ~/.curator/curator.yml --dry-run Do not perform any changes. --version Show the version and exit. --help Show this message and exit.
公式サイト見て英語なんでなんとなくの理解ですが、設定ファイル(.yml)を作成して#curator --config [設定ファイルがあるディレクトリ指定]
で適応させる感じでしょうか?
/root/.curator/delete.ymlを作成して#curator --config /root/.curator/delete.yml
実行すると
Error: Missing argument "action_file".
とエラーでaction fileではないといわれます…原因がわかりません。。
以下はdelete.ymlの中身です。公式(ここ)からのコピペで必要は個所を直しています
actions: 1: action: delete_indices description: >- Delete indices older than 45 days (based on index name), for logstash- prefixed indices. Ignore the error if the filter does not result in an actionable list of indices (ignore_empty_list) and exit cleanly. options: ignore_empty_list: True timeout_override: continue_if_exception: False disable_action: False filters: - filtertype: pattern kind: prefix value: logstash-* exclude: False - filtertype: age source: name direction: older timestring: '%Y.%m.%d' unit: days unit_count: 30 exclude: False
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。