jarファイルに実行権限をつけるのみ。公式サイトの通りにやると楽だが、curlがエラーとなってしまったので、手動でダウンロードした
http://qiita.com/handa/items/6ba0bc0678b0be95a1be
in:
type: s3
bucket: バケット名
path_prefix:
endpoint: s3-ap-northeast-1.amazonaws.com
access_key_id:
secret_access_key:
decoders:
- {type: gzip}
parser:
type: json
root: $.Records
schema:
- {name: host, type: string}
- {name: user, type: string}
- {name: method, type: string}
- {name: path, type: string}
- {name: code, type: integer}
- {name: size, type: integer}
- {name: referer, type: string}
- {name: agent, type: string}
out:
type: elasticsearch
cluster_name:
nodes:
- {host: "localhost", port: 9300}
index: logstash-2016.06.04
index_type: apache
embulk preview config.yml embulk run config.yml
JSONのパースでエラー!guessコマンドを利用しても同様。クソですか? td-agentの形式に対応していないというオチ。別のプラグインを入れる。 ようやくパースに成功したと思ったら、 「None of the configured nodes are available」だとcluster_nameを設定していないのが原因だった。環境変数が使えないという問題はあったものの素のElasticsearchには投入成功。ポートは9300じゃないとだめ
out:
type: elasticsearch
cluster_name: "elasticsearch"
nodes:
- {host: "IPV4 ADDRESS", port: 9300}
index: logstash-2016.06.09
index_type: apache
liquidという拡張子にすると環境変数を展開してくれる。