fluent-plugin-influxdb-v2 1.7.0.pre.900 → 1.8.0.pre.1021
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -3
- data/CHANGELOG.md +7 -2
- data/README.md +5 -1
- data/examples/README.md +1 -1
- data/examples/run-example.sh +1 -1
- data/fluent-plugin-influxdb-v2.gemspec +2 -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 +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a184ab7f5812ee9974db610247187bbca47080079f3ffb610b535797b28d1c5
|
4
|
+
data.tar.gz: 97fbf1e06efc6728673cbd2e35f5a2ef5639e54fa09e0fa260b811810dd0dc73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86004d977d07877bf268fa1b79f4645c396ca10be5c4474dbacc8c81cc43aa87a236b218424906f3f452f210aa9f6d5ab0aef710dffe7e978773b853fe29649c
|
7
|
+
data.tar.gz: 8bf932e88c5fbfb30451f8f807cf1f9ae0275a7cd8089d9379aee09538e080563b95ea281e200932add3efeb62c619f2a5cbff620b99c46f605fd6d3e1f28207
|
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:
|
81
|
+
default: &default-influxdb-image "influxdb:latest"
|
82
82
|
docker:
|
83
83
|
- image: << parameters.ruby-image >>
|
84
|
-
- image: &influx-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: "
|
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.
|
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. [#
|
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.
|
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
|
data/examples/README.md
CHANGED
data/examples/run-example.sh
CHANGED
@@ -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.
|
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.
|
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
|
|
@@ -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.8.0.pre.1021
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Bednar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-16 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
|
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
|
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
|
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
226
|
- !ruby/object:Gem::Version
|
227
227
|
version: 1.3.1
|
228
228
|
requirements: []
|
229
|
-
rubygems_version: 3.0.3
|
229
|
+
rubygems_version: 3.0.3.1
|
230
230
|
signing_key:
|
231
231
|
specification_version: 4
|
232
232
|
summary: InfluxDB 2 output plugin for Fluentd
|