fluent-plugin-influxdb-v2 1.7.0.pre.831 → 1.8.0.pre.972

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: cfac6beafe172f9a86b7d6269ab4d68c048a8969c2245d14c8edd032bd2d1a11
4
- data.tar.gz: 7943cf450cc6c80bd090a807980f7a8498fc1aa2efc3bb8af3e0c213a85aa03a
3
+ metadata.gz: 1b7ff29c6e9ca3c151924c52453da41318b5e05e3df4bcbb688cd3ec893b8cd7
4
+ data.tar.gz: 4e69058c9f02fa37b420952e1ccfb246ef86e99cc944d05cce073965b88da5ef
5
5
  SHA512:
6
- metadata.gz: 47c8c1bb81a78595aaac5980a4309ea31979f6aee9d8ad8af1c3b0919a1f3b472f8db9f69713c29e620361fc28f4b45165fc17e6bd73d8b7e61b34679a2718ba
7
- data.tar.gz: b2a6e37795379fc3e2a14753a53cad1f82a6b89b5724d1d74c5fa1b87747a4456f66f10a5b5a0d168408240e328938c5c0e81bb19ef4e87941d592c2aed4355a
6
+ metadata.gz: db437e5e2002a0c69fbcfba3815e203c481c88daa63cb2a3c83364e67c9ceb38be5e8c3380c8e5eda8de2ba79607e036f5d7e965092c014d87e5e790ef6e5577
7
+ data.tar.gz: 9642e68088156e73edfb13b9ddd948a1466159c4ff0a5a8f03223b69aee0a7cb526c0b3f87d5755bdbb430c7642f3f787a232feb85efa31ca7be5e345efe5a71
data/.circleci/config.yml CHANGED
@@ -78,10 +78,10 @@ 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:v2.0.3"
81
+ default: &default-influxdb-image "influxdb:latest"
82
82
  docker:
83
83
  - image: << parameters.ruby-image >>
84
- - image: &influx-image quay.io/influxdb/<< parameters.influxdb-image >>
84
+ - image: &influx-image << parameters.influxdb-image >>
85
85
  environment:
86
86
  INFLUXD_HTTP_BIND_ADDRESS: :8086
87
87
  steps:
@@ -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: "influxdb2:nightly"
127
+ influxdb-image: "quay.io/influxdb/influxdb: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,12 @@
1
- ## 1.7.0 [unreleased]
1
+ ## 1.8.0 [unreleased]
2
+
3
+ ## 1.7.0 [2021-03-05]
4
+
5
+ ### Features
6
+ 1. [#23](https://github.com/influxdata/influxdb-plugin-fluent/pull/23): Added possibility to specify the certification verification behaviour
2
7
 
3
8
  ### CI
4
- 1. [#19](https://github.com/influxdata/influxdb-plugin-fluent/pull/19): Updated default docker image to v2.0.3
9
+ 1. [#24](https://github.com/influxdata/influxdb-plugin-fluent/pull/24): Updated stable image to `influxdb:latest` and nightly to `quay.io/influxdb/influxdb:nightly`
5
10
 
6
11
  ## 1.6.0 [2020-10-02]
7
12
 
data/README.md CHANGED
@@ -19,7 +19,7 @@ This repository contains the reference Fluentd plugin for the InfluxDB 2.0.
19
19
  The plugin is bundled as a gem and is hosted on [Rubygems](https://rubygems.org/gems/fluent-plugin-influxdb-v2). You can install the gem as follows:
20
20
 
21
21
  ```
22
- fluent-gem install fluent-plugin-influxdb-v2 -v 1.6.0
22
+ fluent-gem install fluent-plugin-influxdb-v2 -v 1.7.0
23
23
  ```
24
24
 
25
25
  ## Plugins
@@ -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="v2.0.3"
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:v2.0.3
44
+ influxdb:latest
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:v2.0.3
52
+ influxdb:latest
53
53
 
54
54
  #
55
55
  # Post onBoarding request to InfluxDB 2
@@ -47,10 +47,10 @@ 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
+ spec.add_runtime_dependency 'influxdb-client', '1.12.0'
51
51
 
52
52
  spec.add_development_dependency 'bundler', '~> 2.0'
53
- spec.add_development_dependency 'codecov', '~> 0.2.8'
53
+ spec.add_development_dependency 'codecov', '~> 0.1.16'
54
54
  spec.add_development_dependency 'minitest', '~> 5.0'
55
55
  spec.add_development_dependency 'minitest-reporters', '~> 1.4'
56
56
  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.7.0'.freeze
24
+ VERSION = '1.8.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.7.0.pre.831
4
+ version: 1.8.0.pre.972
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-12-16 00:00:00.000000000 Z
11
+ date: 2021-03-05 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
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
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