Fluent::Plugin::Dbi, a plugin for Fluentd
Fluentd Output plugin using DBI
DBI を使って PostgreSQL や MySQL へ INSERT とかを行う Fluentd の Output Plugin
Installation
Add this line to your application's Gemfile:
gem 'fluent-plugin-dbi'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fluent-plugin-dbi
Usage
<match dbi.*>
type dbi
#dsn DBI:Pg:dbname:dbhost
dsn DBI:Mysql:dbname:dbhost
db_user username
db_pass password
keys host,time_m,method,uri,protocol,status
query insert into access_log (host, time, method, uri, protocol, status) values (?, ?, ?, ?, ?, ?)
</match>
Contributing
- Fork it
- 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