はじめに fluentd から elasticsearch にログを送る際に logstash 形式で送るのがお手軽 デフォルトでは logstash-YYYY.MM.DD という名前のインデックスが一つしか作られない でも、この形式で複数のインデックスを保存したい場合どうするの? 複数のインデックスは不要だけど elasticsearch の type を分けることで kibana からそれぞれにアクセスすることも可能 こうする logstash_prefix を使う fluent-plugin-elasticsearch の logstash_prefix を使う。 <source> type tail path /var/log/nginx/access.log pos_file /tmp/nginx.pos tag nginx.access format nginx </sourc