fluent-plugin-pgjson 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -37,6 +37,7 @@ CREATE TABLE fluentd (
37
37
  type pgjson
38
38
  host localhost
39
39
  port 5432
40
+ sslmode require
40
41
  database fluentd
41
42
  table fluentd
42
43
  user postgres
@@ -53,6 +54,7 @@ CREATE TABLE fluentd (
53
54
  |---|---|---|
54
55
  |host|postgres server hostname|localhost|
55
56
  |port|postgres server port number|5432|
57
+ |sslmode|use ssl (disable/allow/prefer/require)|prefer||
56
58
  |database|database name to which records will be inserted||
57
59
  |table|table name to which records will be inserted||
58
60
  |user|user name used to connect database|nil|
@@ -64,6 +66,6 @@ CREATE TABLE fluentd (
64
66
  ## Copyright
65
67
 
66
68
  <table>
67
- <tr><td>Copyright</td><td>Copyright (c) 2012 OKUNO Akihiro</td></tr>
68
- <tr><td>License</td><td>Apache License, Version 2.0</td></tr>
69
+ <tr><td>Copyright</td><td>Copyright (c) 2012,2013 OKUNO Akihiro</td></tr>
70
+ <tr><td>License</td><td>Apache License, Version 4.0</td></tr>
69
71
  </table>
data/example.conf CHANGED
@@ -6,6 +6,7 @@
6
6
  type pgjson
7
7
  host localhost
8
8
  port 5432
9
+ sslmode require
9
10
  database fluentd
10
11
  table fluentd
11
12
  user postgres
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-pgjson"
6
- s.version = "0.0.3"
6
+ s.version = "0.0.4"
7
7
  s.authors = ["OKUNO Akihiro"]
8
8
  s.email = ["choplin.choplin@gmail.com"]
9
9
  s.homepage = "https://github.com/choplin/fluent-plugin-pgjson"
@@ -5,6 +5,7 @@ class PgJsonOutput < Fluent::BufferedOutput
5
5
 
6
6
  config_param :host , :string , :default => 'localhost'
7
7
  config_param :port , :integer , :default => 5432
8
+ config_param :sslmode , :string , :default => 'prefer'
8
9
  config_param :database , :string
9
10
  config_param :table , :string
10
11
  config_param :user , :string , :default => nil
@@ -58,7 +59,7 @@ class PgJsonOutput < Fluent::BufferedOutput
58
59
  $log.debug "Connecting to PostgreSQL server #{@host}:#{@port}, database #{@database}..."
59
60
 
60
61
  begin
61
- @conn = PGconn.new(:dbname => @database, :host => @host, :port => @port, :user => @user, :password => @password)
62
+ @conn = PGconn.new(:dbname => @database, :host => @host, :port => @port, :sslmode => @sslmode, :user => @user, :password => @password)
62
63
  @conn.setnonblocking(true)
63
64
  rescue
64
65
  if ! @conn.nil?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-pgjson
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-24 00:00:00.000000000 Z
12
+ date: 2013-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd