fluent-plugin-influxdb-v2 1.6.0 → 1.7.0.pre.935
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -2
- data/CHANGELOG.md +9 -1
- data/README.md +4 -0
- data/bin/influxdb-restart.sh +1 -1
- data/examples/README.md +1 -1
- data/examples/run-example.sh +1 -1
- data/fluent-plugin-influxdb-v2.gemspec +3 -2
- data/lib/fluent/plugin/out_influxdb2.rb +7 -2
- data/lib/fluent/plugin/version.rb +1 -1
- data/test/influxdb/plugin/output_test.rb +35 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b94a23a6f5078b6434a0dc7459754dfaac82dccb65dfa272163465a9043a0649
|
4
|
+
data.tar.gz: 827ef1d8f027500443032fe17c983a5bb5b1cbcc1bd76b2950c22d328847d6d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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: "
|
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
|
-
|
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
|
data/bin/influxdb-restart.sh
CHANGED
@@ -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="
|
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
data/examples/run-example.sh
CHANGED
@@ -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
|
-
|
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.
|
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
|
|
@@ -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.
|
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:
|
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.
|
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.
|
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.
|
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.
|
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:
|
227
|
+
version: 1.3.1
|
228
228
|
requirements: []
|
229
229
|
rubygems_version: 3.0.3
|
230
230
|
signing_key:
|