fluent-plugin-influxdb-v2 1.5.0 → 1.6.0.pre.706

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: a0dcbcfcf7c99f06c181b7dcd8964c47212812d03239fab4a55f2d7601aba7e8
4
- data.tar.gz: 4768cc4b01416c51e8b220cff1d9f2480f2431e211a349308b896ef7ca5924a7
3
+ metadata.gz: 0e7c3b205fb1da8441c2ac9452dbea311a323e03dfe9ee202667e59d91926aae
4
+ data.tar.gz: 91caf4cb3e10dea1fbb306d2833c60e83e6b69ca4db86bfeee6aa1fe8d169941
5
5
  SHA512:
6
- metadata.gz: 4d9f7928d5740e6f4fc7ccf94825b4f48474a65b80635efd0c6537dd72b8852e6a7f72218109bcc17f4bbba80d107ca25a76b7268e6732e78497ef896097a43b
7
- data.tar.gz: 62b59a6545e1c0211cab72ae598f03aef89192cb2244910816a92b86add81fa99cead076de4177186284ee64c7fa55c724528dfae634c036e3996ffc6849d4df
6
+ metadata.gz: 8f0ade651e2a8406ccc2e3eac5c9259f2e859bd771df4f3bc193ac7135085e58c1e03471637d54d9e2158fb36afd9e7d8e4a453d79aadd14952969cec43f7cd2
7
+ data.tar.gz: 4757243b8aa23d937cf3106c00f00b928b384908a542216121bde36cc85f136d042bf0ff59416af30724e373ee6f19a1ea48c1fe2406a4ba6d404cd9d67fe88e
@@ -78,10 +78,12 @@ 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-beta"
81
+ default: &default-influxdb-image "influxdb:2.0.0-rc"
82
82
  docker:
83
83
  - image: << parameters.ruby-image >>
84
84
  - image: &influx-image quay.io/influxdb/<< parameters.influxdb-image >>
85
+ environment:
86
+ INFLUXD_HTTP_BIND_ADDRESS: :8086
85
87
  steps:
86
88
  - prepare
87
89
  - test:
@@ -89,13 +91,8 @@ jobs:
89
91
  - storing-test-results
90
92
 
91
93
  deploy-preview:
92
- parameters:
93
- influxdb-image:
94
- type: string
95
- default: *default-influxdb-image
96
94
  docker:
97
95
  - image: *default-ruby-image
98
- - image: *influx-image
99
96
  steps:
100
97
  - run:
101
98
  name: Early return if this build is from a forked repository
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ ---
5
+
6
+ <!--
7
+
8
+ Thank you for reporting a bug.
9
+
10
+ * Please add a :+1: or comment on a similar existing bug report instead of opening a new one.
11
+ * https://github.com/influxdata/influxdb-plugin-fluent/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+is%3Aclosed+sort%3Aupdated-desc+label%3Abug+
12
+ * Please check whether the bug can be reproduced with the latest release.
13
+ * The fastest way to fix a bug is to open a Pull Request.
14
+ * https://github.com/influxdata/influxdb-plugin-fluent/pulls
15
+
16
+ -->
17
+
18
+ __Steps to reproduce:__
19
+ List the minimal actions needed to reproduce the behavior.
20
+
21
+ 1. ...
22
+ 2. ...
23
+ 3. ...
24
+
25
+ __Expected behavior:__
26
+ Describe what you expected to happen.
27
+
28
+ __Actual behavior:__
29
+ Describe What actually happened.
30
+
31
+ __Specifications:__
32
+ - Client Version:
33
+ - InfluxDB Version:
34
+ - Platform:
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: Feature request
3
+ about: Opening a feature request kicks off a discussion
4
+ ---
5
+
6
+ <!--
7
+
8
+ Thank you for suggesting an idea to improve this client.
9
+
10
+ * Please add a :+1: or comment on a similar existing feature request instead of opening a new one.
11
+ * https://github.com/influxdata/influxdb-plugin-fluent/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+is%3Aclosed+sort%3Aupdated-desc+label%3A%22enhancement%22+
12
+
13
+ -->
14
+
15
+ __Proposal:__
16
+ Short summary of the feature.
17
+
18
+ __Current behavior:__
19
+ Describe what currently happens.
20
+
21
+ __Desired behavior:__
22
+ Describe what you want.
23
+
24
+ __Alternatives considered:__
25
+ Describe other solutions or features you considered.
26
+
27
+ __Use case:__
28
+ Why is this important (helps with prioritizing requests)?
@@ -1,8 +1,16 @@
1
1
  Closes #
2
2
 
3
+ ## Proposed Changes
4
+
3
5
  _Briefly describe your proposed changes:_
4
6
 
7
+ ## Checklist
8
+
9
+ <!-- Checkboxes below this note can be erased if not applicable to your Pull Request. -->
10
+
5
11
  - [ ] CHANGELOG.md updated
6
12
  - [ ] Rebased/mergeable
7
- - [ ] Tests pass
8
- - [ ] Sign [CLA](https://influxdata.com/community/cla/) (if not already signed)
13
+ - [ ] A test has been added if appropriate
14
+ - [ ] `rake test` completes successfully
15
+ - [ ] Commit messages are in [semantic format](https://seesparkbox.com/foundry/semantic_commit_messages)
16
+ - [ ] Sign [CLA](https://influxdata.com/community/cla/) (if not already signed)
@@ -0,0 +1,3 @@
1
+ # docs: https://github.com/probot/semantic-pull-requests#configuration
2
+ # Always validate the PR title AND all the commits
3
+ titleAndCommits: true
@@ -1,3 +1,8 @@
1
+ ## 1.6.0 [unreleased]
2
+
3
+ ### API
4
+ 1. [#15](https://github.com/influxdata/influxdb-plugin-fluent/pull/15): Default port changed from 9999 -> 8086
5
+
1
6
  ## 1.5.0 [2020-07-17]
2
7
 
3
8
  1. [#12](https://github.com/influxdata/influxdb-plugin-fluent/pull/12): Renamed gem to `fluent-plugin-influxdb-v2`
data/README.md CHANGED
@@ -32,7 +32,7 @@ Store Fluentd event to InfluxDB 2 database.
32
32
 
33
33
  | Option | Description | Type | Default |
34
34
  |---|---|---|---|
35
- | url | InfluxDB URL to connect to (ex. https://localhost:9999). | String | https://localhost:9999 |
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
38
  | bucket | Specifies the destination bucket for writes. | String | |
@@ -51,8 +51,8 @@ Store Fluentd event to InfluxDB 2 database.
51
51
  <match influxdb2.**>
52
52
  @type influxdb2
53
53
 
54
- # InfluxDB URL to connect to (ex. https://localhost:9999).
55
- url https://localhost:9999
54
+ # InfluxDB URL to connect to (ex. https://localhost:8086).
55
+ url https://localhost:8086
56
56
  # Access Token used for authenticating/authorizing the InfluxDB request sent by client.
57
57
  token my-token
58
58
 
@@ -69,8 +69,8 @@ Store Fluentd event to InfluxDB 2 database.
69
69
  <match influxdb2.**>
70
70
  @type influxdb2
71
71
 
72
- # InfluxDB URL to connect to (ex. https://localhost:9999).
73
- url https://localhost:9999
72
+ # InfluxDB URL to connect to (ex. https://localhost:8086).
73
+ url https://localhost:8086
74
74
  # Access Token used for authenticating/authorizing the InfluxDB request sent by client.
75
75
  token my-token
76
76
  # Turn on/off SSL for HTTP communication.
@@ -24,12 +24,12 @@
24
24
  set -e
25
25
 
26
26
  echo "Wait to start InfluxDB 2.0"
27
- wget -S --spider --tries=20 --retry-connrefused --waitretry=5 http://localhost:9999/metrics
27
+ wget -S --spider --tries=20 --retry-connrefused --waitretry=5 http://localhost:8086/metrics
28
28
 
29
29
  echo
30
30
  echo "Post onBoarding request, to setup initial user (my-user@my-password), org (my-org) and bucketSetup (my-bucket)"
31
31
  echo
32
- curl -i -X POST http://localhost:9999/api/v2/setup -H 'accept: application/json' \
32
+ curl -i -X POST http://localhost:8086/api/v2/setup -H 'accept: application/json' \
33
33
  -d '{
34
34
  "username": "my-user",
35
35
  "password": "my-password",
@@ -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-beta"
30
+ DEFAULT_INFLUXDB_V2_VERSION="2.0.0-rc"
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}
@@ -49,9 +49,10 @@ echo
49
49
  docker pull "${INFLUXDB_V2_IMAGE}" || true
50
50
  docker run \
51
51
  --detach \
52
+ --env INFLUXD_HTTP_BIND_ADDRESS=:8086 \
52
53
  --name influxdb_v2 \
53
54
  --network influx_network \
54
- --publish 9999:9999 \
55
+ --publish 8086:8086 \
55
56
  "${INFLUXDB_V2_IMAGE}"
56
57
 
57
58
  #
@@ -37,15 +37,16 @@ Start latest `InfluxDB 2`:
37
37
  ```bash
38
38
  docker run \
39
39
  --detach \
40
+ --env INFLUXD_HTTP_BIND_ADDRESS=:8086 \
40
41
  --name influxdb_v2 \
41
42
  --network influx_network \
42
- --publish 9999:9999 \
43
- quay.io/influxdb/influxdb:2.0.0-beta
43
+ --publish 8086:8086 \
44
+ quay.io/influxdb/influxdb:2.0.0-rc
44
45
  ```
45
46
 
46
47
  Create default organization, user and bucket:
47
48
  ```bash
48
- curl -i -X POST http://localhost:9999/api/v2/setup -H 'accept: application/json' \
49
+ curl -i -X POST http://localhost:8086/api/v2/setup -H 'accept: application/json' \
49
50
  -d '{
50
51
  "username": "my-user",
51
52
  "password": "my-password",
@@ -103,7 +104,7 @@ USER fluent
103
104
  @type copy
104
105
  <store>
105
106
  @type influxdb2
106
- url http://influxdb_v2:9999
107
+ url http://influxdb_v2:8086
107
108
  token my-token
108
109
  bucket my-bucket
109
110
  org my-org
@@ -161,7 +162,7 @@ curl http://localhost:8080/not_exists
161
162
 
162
163
  ### Step 7 — Import Dashboard
163
164
 
164
- Open [InfluxDB](http://localhost:9999) and import dashboard [web_app_access.json](influxdb/web_app_access.json) by following steps:
165
+ Open [InfluxDB](http://localhost:8086) and import dashboard [web_app_access.json](influxdb/web_app_access.json) by following steps:
165
166
 
166
167
  ```
167
168
  username: my-user
@@ -22,7 +22,7 @@
22
22
  <store>
23
23
  @type influxdb2
24
24
  # @log_level trace
25
- url http://influxdb_v2:9999
25
+ url http://influxdb_v2:8086
26
26
  token my-token
27
27
  bucket my-bucket
28
28
  org my-org
@@ -45,10 +45,11 @@ docker network create -d bridge influx_network --subnet 192.168.0.0/24 --gateway
45
45
  #
46
46
  docker run \
47
47
  --detach \
48
+ --env INFLUXD_HTTP_BIND_ADDRESS=:8086 \
48
49
  --name influxdb_v2 \
49
50
  --network influx_network \
50
- --publish 9999:9999 \
51
- quay.io/influxdb/influxdb:2.0.0-beta
51
+ --publish 8086:8086 \
52
+ quay.io/influxdb/influxdb:2.0.0-rc
52
53
 
53
54
  #
54
55
  # Post onBoarding request to InfluxDB 2
@@ -110,4 +111,4 @@ docker run \
110
111
 
111
112
  docker logs -f fluentd_influx
112
113
 
113
- #curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Token my-token" "http://localhost:9999/orgs/3c7a552ae6b01ebd/dashboards/import" -d @influxdb/web_app_access_dashboard.json
114
+ #curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Token my-token" "http://localhost:8086/orgs/3c7a552ae6b01ebd/dashboards/import" -d @influxdb/web_app_access_dashboard.json
@@ -50,7 +50,7 @@ Gem::Specification.new do |spec|
50
50
  spec.add_runtime_dependency 'influxdb-client', '1.6.0'
51
51
 
52
52
  spec.add_development_dependency 'bundler', '~> 2.0'
53
- spec.add_development_dependency 'codecov', '~> 0.1.16'
53
+ spec.add_development_dependency 'codecov', '~> 0.2.8'
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'
@@ -29,8 +29,8 @@ class InfluxDBOutput < Fluent::Plugin::Output
29
29
 
30
30
  DEFAULT_BUFFER_TYPE = 'memory'.freeze
31
31
 
32
- config_param :url, :string, default: 'https://localhost:9999'
33
- desc 'InfluxDB URL to connect to (ex. https://localhost:9999).'
32
+ config_param :url, :string, default: 'https://localhost:8086'
33
+ desc 'InfluxDB URL to connect to (ex. https://localhost:8086).'
34
34
 
35
35
  config_param :token, :string
36
36
  desc 'Access Token used for authenticating/authorizing the InfluxDB request sent by client.'
@@ -21,7 +21,7 @@
21
21
  module InfluxDB2
22
22
  module Plugin
23
23
  module Fluent
24
- VERSION = '1.5.0'.freeze
24
+ VERSION = '1.6.0'.freeze
25
25
  end
26
26
  end
27
27
  end
@@ -151,7 +151,7 @@ class InfluxDBOutputTest < Minitest::Test
151
151
  end
152
152
 
153
153
  def test_measurement_as_parameter
154
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
154
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
155
155
  .to_return(status: 204)
156
156
  driver = create_driver(%(
157
157
  @type influxdb2
@@ -164,12 +164,12 @@ class InfluxDBOutputTest < Minitest::Test
164
164
  driver.run(default_tag: 'test') do
165
165
  emit_documents(driver)
166
166
  end
167
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
167
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
168
168
  times: 1, body: 'h2o level=2i,location="europe" 1444897215000000000')
169
169
  end
170
170
 
171
171
  def test_measurement_as_tag
172
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
172
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
173
173
  .to_return(status: 204)
174
174
  driver = create_driver(%(
175
175
  @type influxdb2
@@ -181,12 +181,12 @@ class InfluxDBOutputTest < Minitest::Test
181
181
  driver.run(default_tag: 'h2o_tag') do
182
182
  emit_documents(driver)
183
183
  end
184
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
184
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
185
185
  times: 1, body: 'h2o_tag level=2i,location="europe" 1444897215000000000')
186
186
  end
187
187
 
188
188
  def test_tag_keys
189
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
189
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
190
190
  .to_return(status: 204)
191
191
  driver = create_driver(%(
192
192
  @type influxdb2
@@ -198,12 +198,12 @@ class InfluxDBOutputTest < Minitest::Test
198
198
  driver.run(default_tag: 'h2o_tag') do
199
199
  emit_documents(driver)
200
200
  end
201
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
201
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
202
202
  times: 1, body: 'h2o_tag,location=europe level=2i 1444897215000000000')
203
203
  end
204
204
 
205
205
  def test_tag_fluentd
206
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
206
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
207
207
  .to_return(status: 204)
208
208
  driver = create_driver(%(
209
209
  @type influxdb2
@@ -217,12 +217,12 @@ class InfluxDBOutputTest < Minitest::Test
217
217
  driver.run(default_tag: 'system.logs') do
218
218
  emit_documents(driver)
219
219
  end
220
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
220
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
221
221
  times: 1, body: 'h2o,fluentd=system.logs,location=europe level=2i 1444897215000000000')
222
222
  end
223
223
 
224
224
  def test_field_keys
225
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
225
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
226
226
  .to_return(status: 204)
227
227
  driver = create_driver(%(
228
228
  @type influxdb2
@@ -235,12 +235,12 @@ class InfluxDBOutputTest < Minitest::Test
235
235
  driver.run(default_tag: 'h2o_tag') do
236
236
  emit_documents(driver, 'location' => 'europe', 'level' => 2, 'version' => 'v.10')
237
237
  end
238
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
238
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
239
239
  times: 1, body: 'h2o_tag,location=europe level=2i 1444897215000000000')
240
240
  end
241
241
 
242
242
  def test_time_precision_ns
243
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
243
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
244
244
  .to_return(status: 204)
245
245
  driver = create_driver(%(
246
246
  @type influxdb2
@@ -253,12 +253,12 @@ class InfluxDBOutputTest < Minitest::Test
253
253
  driver.run(default_tag: 'h2o_tag') do
254
254
  emit_documents(driver, 'location' => 'europe', 'level' => 2, 'version' => 'v.10')
255
255
  end
256
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
256
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
257
257
  times: 1, body: 'h2o_tag,version=v.10 level=2i,location="europe" 1444897215000000000')
258
258
  end
259
259
 
260
260
  def test_time_integer
261
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
261
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
262
262
  .to_return(status: 204)
263
263
  driver = create_driver(%(
264
264
  @type influxdb2
@@ -269,12 +269,12 @@ class InfluxDBOutputTest < Minitest::Test
269
269
  driver.run(default_tag: 'h2o_tag') do
270
270
  driver.feed(123_465_789, 'location' => 'europe', 'level' => 2, 'version' => 'v.10')
271
271
  end
272
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
272
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
273
273
  times: 1, body: 'h2o_tag level=2i,location="europe",version="v.10" 123465789')
274
274
  end
275
275
 
276
276
  def test_time_precision_us
277
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=us')
277
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=us')
278
278
  .to_return(status: 204)
279
279
  driver = create_driver(%(
280
280
  @type influxdb2
@@ -287,12 +287,12 @@ class InfluxDBOutputTest < Minitest::Test
287
287
  driver.run(default_tag: 'h2o_tag') do
288
288
  emit_documents(driver, 'location' => 'europe', 'level' => 2, 'version' => 'v.10')
289
289
  end
290
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=us',
290
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=us',
291
291
  times: 1, body: 'h2o_tag,version=v.10 level=2i,location="europe" 1444897215000000')
292
292
  end
293
293
 
294
294
  def test_time_precision_ms
295
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ms')
295
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ms')
296
296
  .to_return(status: 204)
297
297
  driver = create_driver(%(
298
298
  @type influxdb2
@@ -305,12 +305,12 @@ class InfluxDBOutputTest < Minitest::Test
305
305
  driver.run(default_tag: 'h2o_tag') do
306
306
  emit_documents(driver, 'location' => 'europe', 'level' => 2, 'version' => 'v.10')
307
307
  end
308
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ms',
308
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ms',
309
309
  times: 1, body: 'h2o_tag,version=v.10 level=2i,location="europe" 1444897215000')
310
310
  end
311
311
 
312
312
  def test_time_precision_s
313
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=s')
313
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=s')
314
314
  .to_return(status: 204)
315
315
  driver = create_driver(%(
316
316
  @type influxdb2
@@ -323,12 +323,12 @@ class InfluxDBOutputTest < Minitest::Test
323
323
  driver.run(default_tag: 'h2o_tag') do
324
324
  emit_documents(driver, 'location' => 'europe', 'level' => 2, 'version' => 'v.10')
325
325
  end
326
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=s',
326
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=s',
327
327
  times: 1, body: 'h2o_tag,version=v.10 level=2i,location="europe" 1444897215')
328
328
  end
329
329
 
330
330
  def test_time_key
331
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
331
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
332
332
  .to_return(status: 204)
333
333
  driver = create_driver(%(
334
334
  @type influxdb2
@@ -342,12 +342,12 @@ class InfluxDBOutputTest < Minitest::Test
342
342
  emit_documents(driver, 'location' => 'europe', 'level' => 2, 'version' => 'v.10',
343
343
  'time' => 1_544_897_215_000_000_000)
344
344
  end
345
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
345
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
346
346
  times: 1, body: 'h2o_tag,version=v.10 level=2i,location="europe" 1544897215000000000')
347
347
  end
348
348
 
349
349
  def test_field_cast_to_float
350
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
350
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
351
351
  .to_return(status: 204)
352
352
  driver = create_driver(%(
353
353
  @type influxdb2
@@ -359,12 +359,12 @@ class InfluxDBOutputTest < Minitest::Test
359
359
  driver.run(default_tag: 'h2o_tag') do
360
360
  emit_documents(driver)
361
361
  end
362
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
362
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
363
363
  times: 1, body: 'h2o_tag level=2.0,location="europe" 1444897215000000000')
364
364
  end
365
365
 
366
366
  def test_nested_field
367
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
367
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
368
368
  .to_return(status: 204)
369
369
  driver = create_driver(%(
370
370
  @type influxdb2
@@ -379,7 +379,7 @@ class InfluxDBOutputTest < Minitest::Test
379
379
  end
380
380
  body = 'h2o_tag level=2i,location="europe",nest.a=25i,nest.deep.deep-key="deep-value",nest.key="nested value" ' \
381
381
  '1444897215000000000'
382
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
382
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
383
383
  times: 1, body: body)
384
384
  end
385
385
 
@@ -408,7 +408,7 @@ class InfluxDBOutputTest < Minitest::Test
408
408
  'stream' => 'stdout'
409
409
  }
410
410
 
411
- stub_request(:any, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
411
+ stub_request(:any, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns')
412
412
  .to_return(status: 204)
413
413
  driver = create_driver(%(
414
414
  @type influxdb2
@@ -431,7 +431,7 @@ class InfluxDBOutputTest < Minitest::Test
431
431
  'kubernetes.pod_name="fluentd-49xk2",log="2020-06-17 13:19:42 +0000 [info]: #0 [filter_kube_metadata] stats - '\
432
432
  'namespace_cache_size: 2, pod_cache_size: 6, pod_cache_watch_updates: 1, namespace_cache_api_updates: 6, '\
433
433
  'pod_cache_api_updates: 6, id_cache_miss: 6\\\n",stream="stdout" 1444897215000000000'
434
- assert_requested(:post, 'https://localhost:9999/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
434
+ assert_requested(:post, 'https://localhost:8086/api/v2/write?bucket=my-bucket&org=my-org&precision=ns',
435
435
  times: 1, body: body)
436
436
  end
437
437
 
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.5.0
4
+ version: 1.6.0.pre.706
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-07-17 00:00:00.000000000 Z
11
+ date: 2020-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.1.16
61
+ version: 0.2.8
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.1.16
68
+ version: 0.2.8
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -173,7 +173,10 @@ extra_rdoc_files: []
173
173
  files:
174
174
  - ".circleci/config.yml"
175
175
  - ".circleci/setup-rubygems.sh"
176
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
177
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
176
178
  - ".github/PULL_REQUEST_TEMPLATE"
179
+ - ".github/semantic.yml"
177
180
  - ".gitignore"
178
181
  - ".rubocop.yml"
179
182
  - CHANGELOG.md
@@ -219,9 +222,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
219
222
  version: 2.2.0
220
223
  required_rubygems_version: !ruby/object:Gem::Requirement
221
224
  requirements:
222
- - - ">="
225
+ - - ">"
223
226
  - !ruby/object:Gem::Version
224
- version: '0'
227
+ version: 1.3.1
225
228
  requirements: []
226
229
  rubygems_version: 3.0.3
227
230
  signing_key: