fluent-plugin-influxdb-v2 1.6.0 → 1.7.0.pre.935

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61f099ad2dca50eb820fba857368f385f9dac2740376acf096746b6d25e67ff1
4
- data.tar.gz: 83d02f02d0ee8bf62977b63ba1850e483d18461983b3de500f8da2c4f8aece54
3
+ metadata.gz: b94a23a6f5078b6434a0dc7459754dfaac82dccb65dfa272163465a9043a0649
4
+ data.tar.gz: 827ef1d8f027500443032fe17c983a5bb5b1cbcc1bd76b2950c22d328847d6d0
5
5
  SHA512:
6
- metadata.gz: 04b699605764c73821db704d4f5399cf9cb1d2f98229145203ff4d495fe98d607a7923fb5f320b1263db4638bccd8dc892530bd89cfe15175013f79bc7dea683
7
- data.tar.gz: 959800a89fec728293902433e1e26a29f94762600ce4b39dbfa86f43b7a148c72eb7bb098e09662e5e83d6ea75777caa5fcacd17cbfac67f76e2c277cfc9faed
6
+ metadata.gz: e384255ddb07b6db26454f643906cbe9c44ce50ab3ed5f903917d934e6a4924bc188337f0945c8ec26797a0cd1a9f4ae2f39ae5b2e5777963897d1c790207b7a
7
+ data.tar.gz: 48b0524cd35d4c7eea9785b41d74abc3b9ed16862d08f794fe5df374d68d303b718d54338eafc6cdf9fdfb298af58e3fb0bb95a1b89d1fe87932e4f7d00da747
data/.circleci/config.yml CHANGED
@@ -78,7 +78,7 @@ jobs:
78
78
  default: &default-ruby-image "circleci/ruby:2.6-stretch"
79
79
  influxdb-image:
80
80
  type: string
81
- default: &default-influxdb-image "influxdb:2.0.0-rc"
81
+ default: &default-influxdb-image "influxdb:v2.0.4"
82
82
  docker:
83
83
  - image: << parameters.ruby-image >>
84
84
  - image: &influx-image quay.io/influxdb/<< parameters.influxdb-image >>
@@ -124,7 +124,7 @@ workflows:
124
124
  name: ruby-2.6
125
125
  - tests-ruby:
126
126
  name: ruby-2.6-nightly
127
- influxdb-image: "influx:nightly"
127
+ influxdb-image: "influxdb2:nightly"
128
128
  - tests-ruby:
129
129
  name: ruby-2.5
130
130
  ruby-image: "circleci/ruby:2.5-stretch"
data/CHANGELOG.md CHANGED
@@ -1,7 +1,15 @@
1
+ ## 1.7.0 [unreleased]
2
+
3
+ ### Features
4
+ 1. [#23](https://github.com/influxdata/influxdb-plugin-fluent/pull/23): Added possibility to specify the certification verification behaviour
5
+
6
+ ### CI
7
+ 1. [#21](https://github.com/influxdata/influxdb-plugin-fluent/pull/21): Updated default docker image to v2.0.4
8
+
1
9
  ## 1.6.0 [2020-10-02]
2
10
 
3
11
  ### API
4
- 1. [#15](https://github.com/influxdata/influxdb-plugin-fluent/pull/15): Default port changed from 9999 -> 8086
12
+ 1. [#15](https://github.com/influxdata/influxdb-plugin-fluent/pull/15): Default port changed from 9999 -> 8086
5
13
 
6
14
  ### Dependencies
7
15
  1. [#16](https://github.com/influxdata/influxdb-plugin-fluent/pull/16): Upgrade InfluxDB client to 1.8.0
data/README.md CHANGED
@@ -35,6 +35,7 @@ Store Fluentd event to InfluxDB 2 database.
35
35
  | url | InfluxDB URL to connect to (ex. https://localhost:8086). | String | https://localhost:8086 |
36
36
  | token | Access Token used for authenticating/authorizing the InfluxDB request sent by client. | String | |
37
37
  | use_ssl | Turn on/off SSL for HTTP communication. | bool | true |
38
+ | verify_mode | Sets the flags for the certification verification at beginning of SSL/TLS session. | `"#{OpenSSL::SSL::VERIFY_NONE}"` or `"#{OpenSSL::SSL::VERIFY_PEER}"` | none |
38
39
  | bucket | Specifies the destination bucket for writes. | String | |
39
40
  | org | Specifies the destination organization for writes. | String | |
40
41
  | measurement | The name of the measurement. If not specified, Fluentd's tag is used. | String | nil |
@@ -75,6 +76,9 @@ Store Fluentd event to InfluxDB 2 database.
75
76
  token my-token
76
77
  # Turn on/off SSL for HTTP communication.
77
78
  use_ssl true
79
+ # Sets the flags for the certification verification at beginning of SSL/TLS session.
80
+ # For more info see - https://docs.ruby-lang.org/en/3.0.0/Net/HTTP.html#verify_mode.
81
+ verify_mode "#{OpenSSL::SSL::VERIFY_NONE}"
78
82
 
79
83
  # Specifies the destination bucket for writes.
80
84
  bucket my-bucket
@@ -27,7 +27,7 @@ DEFAULT_DOCKER_REGISTRY="quay.io/influxdb/"
27
27
  DOCKER_REGISTRY="${DOCKER_REGISTRY:-$DEFAULT_DOCKER_REGISTRY}"
28
28
 
29
29
  DEFAULT_INFLUXDB_V2_REPOSITORY="influxdb"
30
- DEFAULT_INFLUXDB_V2_VERSION="2.0.0-rc"
30
+ DEFAULT_INFLUXDB_V2_VERSION="v2.0.4"
31
31
  INFLUXDB_V2_REPOSITORY="${INFLUXDB_V2_REPOSITORY:-$DEFAULT_INFLUXDB_V2_REPOSITORY}"
32
32
  INFLUXDB_V2_VERSION="${INFLUXDB_V2_VERSION:-$DEFAULT_INFLUXDB_V2_VERSION}"
33
33
  INFLUXDB_V2_IMAGE=${DOCKER_REGISTRY}${INFLUXDB_V2_REPOSITORY}:${INFLUXDB_V2_VERSION}
data/examples/README.md CHANGED
@@ -41,7 +41,7 @@ docker run \
41
41
  --name influxdb_v2 \
42
42
  --network influx_network \
43
43
  --publish 8086:8086 \
44
- quay.io/influxdb/influxdb:2.0.0-rc
44
+ quay.io/influxdb/influxdb:v2.0.4
45
45
  ```
46
46
 
47
47
  Create default organization, user and bucket:
@@ -49,7 +49,7 @@ docker run \
49
49
  --name influxdb_v2 \
50
50
  --network influx_network \
51
51
  --publish 8086:8086 \
52
- quay.io/influxdb/influxdb:2.0.0-rc
52
+ quay.io/influxdb/influxdb:v2.0.4
53
53
 
54
54
  #
55
55
  # Post onBoarding request to InfluxDB 2
@@ -47,10 +47,11 @@ Gem::Specification.new do |spec|
47
47
  spec.required_ruby_version = '>= 2.2.0'
48
48
 
49
49
  spec.add_runtime_dependency 'fluentd', '~> 1.8'
50
- spec.add_runtime_dependency 'influxdb-client', '1.8.0'
50
+ # Temporary depends to prerelease version - will be change to 1.12.0 after release the client
51
+ spec.add_runtime_dependency 'influxdb-client', '1.12.0.pre.1894'
51
52
 
52
53
  spec.add_development_dependency 'bundler', '~> 2.0'
53
- spec.add_development_dependency 'codecov', '~> 0.2.8'
54
+ spec.add_development_dependency 'codecov', '~> 0.1.16'
54
55
  spec.add_development_dependency 'minitest', '~> 5.0'
55
56
  spec.add_development_dependency 'minitest-reporters', '~> 1.4'
56
57
  spec.add_development_dependency 'rake', '>= 12.3.3'
@@ -38,6 +38,10 @@ class InfluxDBOutput < Fluent::Plugin::Output
38
38
  config_param :use_ssl, :bool, default: true
39
39
  desc 'Turn on/off SSL for HTTP communication.'
40
40
 
41
+ config_param :verify_mode, :integer, default: nil
42
+ desc 'Sets the flags for the certification verification at beginning of SSL/TLS session. ' \
43
+ 'For more info see - https://docs.ruby-lang.org/en/3.0.0/Net/HTTP.html#verify_mode.'
44
+
41
45
  config_param :bucket, :string
42
46
  desc 'Specifies the destination bucket for writes.'
43
47
 
@@ -97,8 +101,9 @@ class InfluxDBOutput < Fluent::Plugin::Output
97
101
  def start
98
102
  super
99
103
  log.info "Connecting to InfluxDB: url: #{@url}, bucket: #{@bucket}, org: #{@org}, precision = #{@precision}, " \
100
- "use_ssl = #{@use_ssl}"
101
- @client = InfluxDB2::Client.new(@url, @token, bucket: @bucket, org: @org, precision: @precision, use_ssl: @use_ssl)
104
+ "use_ssl = #{@use_ssl}, verify_mode = #{@verify_mode}"
105
+ @client = InfluxDB2::Client.new(@url, @token, bucket: @bucket, org: @org, precision: @precision, use_ssl: @use_ssl,
106
+ verify_mode: @verify_mode)
102
107
  @write_api = @client.create_write_api
103
108
  end
104
109
 
@@ -21,7 +21,7 @@
21
21
  module InfluxDB2
22
22
  module Plugin
23
23
  module Fluent
24
- VERSION = '1.6.0'.freeze
24
+ VERSION = '1.7.0'.freeze
25
25
  end
26
26
  end
27
27
  end
@@ -117,6 +117,41 @@ class InfluxDBOutputTest < Minitest::Test
117
117
  assert_equal '\'use_ssl\' parameter is required but nil is specified', error.message
118
118
  end
119
119
 
120
+ def test_verify_mode_default
121
+ driver = create_driver(%(
122
+ @type influxdb2
123
+ bucket my-bucket
124
+ org my-org
125
+ token my-token
126
+ ))
127
+
128
+ assert_nil driver.instance.verify_mode
129
+ end
130
+
131
+ def test_verify_mode_none
132
+ driver = create_driver(%(
133
+ @type influxdb2
134
+ bucket my-bucket
135
+ org my-org
136
+ token my-token
137
+ verify_mode "#{OpenSSL::SSL::VERIFY_NONE}"
138
+ ))
139
+
140
+ assert_equal OpenSSL::SSL::VERIFY_NONE, driver.instance.verify_mode
141
+ end
142
+
143
+ def test_verify_mode_peer
144
+ driver = create_driver(%(
145
+ @type influxdb2
146
+ bucket my-bucket
147
+ org my-org
148
+ token my-token
149
+ verify_mode "#{OpenSSL::SSL::VERIFY_PEER}"
150
+ ))
151
+
152
+ assert_equal OpenSSL::SSL::VERIFY_PEER, driver.instance.verify_mode
153
+ end
154
+
120
155
  def test_bucket_parameter
121
156
  error = assert_raises Fluent::ConfigError do
122
157
  create_driver(%(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-influxdb-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0.pre.935
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Bednar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-02 00:00:00.000000000 Z
11
+ date: 2021-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.8.0
33
+ version: 1.12.0.pre.1894
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.8.0
40
+ version: 1.12.0.pre.1894
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.2.8
61
+ version: 0.1.16
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.2.8
68
+ version: 0.1.16
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -222,9 +222,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
222
222
  version: 2.2.0
223
223
  required_rubygems_version: !ruby/object:Gem::Requirement
224
224
  requirements:
225
- - - ">="
225
+ - - ">"
226
226
  - !ruby/object:Gem::Version
227
- version: '0'
227
+ version: 1.3.1
228
228
  requirements: []
229
229
  rubygems_version: 3.0.3
230
230
  signing_key: