td-agent on Heroku.
Add this line to your application's Gemfile:
gem 'fluent-plugin-heroku-postgres'
And then execute:
$ bundle
- example
※ Not 'td-agent.conf'
# td-agent-conf.rb
match('postgres.**') {
type :heroku_postgres
heroku_postgres_url "#{::ENV['DATABASE_URL']}"
key_names 'name'
sql "INSERT INTO vendors (name) VALUES ($1)"
}
web: bundle exec fluentd -c td-agent-conf.rb -i "source { type :http; port $PORT }" -vv
- Using ":basic_auth_http" source type
# Procfile
web: bundle exec fluentd -c td-agent-conf.rb -i "source { type :basic_auth_http; port $PORT }" -vv
- Set ENV on Heroku config
USERNAME=name PASSWORD=passwd
- Fork it ( http://github.com//fluent-plugin-heroku-postgres/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request