fluent-plugin-influxdb-v2 1.6.0.pre.585 → 1.6.0.pre.718
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 -6
- data/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +28 -0
- data/.github/PULL_REQUEST_TEMPLATE +10 -2
- data/.github/semantic.yml +3 -0
- data/CHANGELOG.md +6 -0
- data/README.md +5 -5
- data/bin/influxdb-onboarding.sh +2 -2
- data/bin/influxdb-restart.sh +3 -2
- data/examples/README.md +6 -5
- data/examples/fluentd/fluent.conf +1 -1
- data/examples/run-example.sh +4 -3
- data/fluent-plugin-influxdb-v2.gemspec +2 -2
- data/lib/fluent/plugin/out_influxdb2.rb +2 -2
- data/test/influxdb/plugin/output_test.rb +28 -28
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d6668685e6ca9b53f4f97b9923654bf0c725584c40863819d9cb71741c8345a
|
4
|
+
data.tar.gz: 66c4362f1a26d7404f1a622337a3ea8534bf284928321b0972f20ad9edbca283
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a86a48e236b0abf535a79c56c4c9b254eeefcbfe7eeedb4af7a8dfa72576dec74adafb3ba1c63979acf62a60fd35f68e4165a430e8a711f9bcbd8a003ea94836
|
7
|
+
data.tar.gz: a0a6cda78db421500849872737920a313beaa334ac03a11e922f8d043667a132721ccd09edc44cfb73afe3fa5f07fea63a6bb78a43a41cecf1bdf55fd54513b8
|
data/.circleci/config.yml
CHANGED
@@ -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-
|
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
|
-
- [ ]
|
8
|
-
- [ ]
|
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)
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## 1.6.0 [unreleased]
|
2
2
|
|
3
|
+
### API
|
4
|
+
1. [#15](https://github.com/influxdata/influxdb-plugin-fluent/pull/15): Default port changed from 9999 -> 8086
|
5
|
+
|
6
|
+
### Dependencies
|
7
|
+
1. [#16](https://github.com/influxdata/influxdb-plugin-fluent/pull/16): Upgrade InfluxDB client to 1.8.0
|
8
|
+
|
3
9
|
## 1.5.0 [2020-07-17]
|
4
10
|
|
5
11
|
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:
|
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:
|
55
|
-
url https://localhost:
|
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:
|
73
|
-
url https://localhost:
|
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.
|
data/bin/influxdb-onboarding.sh
CHANGED
@@ -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:
|
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:
|
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",
|
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="2.0.0-
|
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
|
55
|
+
--publish 8086:8086 \
|
55
56
|
"${INFLUXDB_V2_IMAGE}"
|
56
57
|
|
57
58
|
#
|
data/examples/README.md
CHANGED
@@ -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
|
43
|
-
quay.io/influxdb/influxdb:2.0.0-
|
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:
|
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:
|
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:
|
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
|
data/examples/run-example.sh
CHANGED
@@ -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
|
51
|
-
quay.io/influxdb/influxdb:2.0.0-
|
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:
|
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
|
@@ -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.8.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.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:
|
33
|
-
desc 'InfluxDB URL to connect to (ex. https://localhost:
|
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.'
|
@@ -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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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:
|
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.6.0.pre.
|
4
|
+
version: 1.6.0.pre.718
|
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-
|
11
|
+
date: 2020-10-02 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.8.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.8.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.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.
|
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
|