Skip to content

ksss/fluent-plugin-postgres-bulk

Repository files navigation

fluent-plugin-postgres-bulk

Fluentd output plugin to postgres.

Usage

<match **>
  @type postgres_bulk
  host my-host-name.local
  port 5432
  username ksss
  password password
  table any
  column_names id,col1,col2,col3
</match>

Plugin build and exec query to postgres like this

INSERT INTO #{@table} (#{column_names}) VALUES (...),(...),(...);

Configuration

Fluent::Plugin::PostgresBulkOutput

host (string) (optional)

Database host.

Default value: 127.0.0.1.

port (integer) (optional)

Database port.

Default value: 5432.

database (string) (required)

Database name.

username (string) (required)

Database user.

password (string) (optional) (secret)

Database password.

Default value: (empty).

table (string) (required)

Bulk insert table.

column_names (array) (required)

Bulk insert column.

Installation

RubyGems

$ gem install fluent-plugin-postgres-bulk

Bundler

Add following line to your Gemfile:

gem "fluent-plugin-postgres-bulk"

And then execute:

$ bundle

Require

  • libpq(build pg gem)

Contributing

I need your help.

Copyright

Copyright (c) 2018 Yuki Kurihara.

LISENCE

MIT

About

fluent plugin for bulk insert to postgres

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •