This output plugin to post to "Amazon Elasticsearch Service".
Add this line to your application's Gemfile:
gem 'fluent-plugin-aws-elasticsearch-service'
In your fluentd configration, use type aws-elasticsearch-service
.
example:
source do
type :tail
format :apache
time_format "%d/%b/%Y:%T %z"
path "/var/log/nginx/access.log"
pos_file "/var/log/td-agent/nginx.access.pos"
tag "es.nginx.access"
end
match ("es.**") do
type "aws-elasticsearch-service"
type_name "access_log"
logstash_format true
include_tag_key true
tag_key "@log_name"
flush_interval "10s"
endpoint do
url "YOUR_ENDPOINT_URL"
region "YOUR_ENDPOINT_REAGION"
end
# endpoint do
# url "https://search-xxxxxxxx.ap-northeast-1.es.amazonaws.com"
# reagion "ap-northeast-1"
# access_key_id "yyyyyyyyy" # optional
# secret_access_key "zzzzzzzzz" # optional
# end
end
If you use the "IAM User", please copy "access_key_id" and "secret_access_key" from a "IAM User".
After checking out the repo, run bin/setup
to install dependencies. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/atomita/fluent-plugin-aws-elasticsearch-service. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.