fluent-plugin-opensearch 1.0.7 → 1.0.9
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/.github/workflows/linux.yml +1 -1
- data/.github/workflows/macos.yml +1 -1
- data/.github/workflows/windows.yml +1 -1
- data/History.md +7 -0
- data/README.md +14 -1
- data/fluent-plugin-opensearch.gemspec +2 -1
- data/lib/fluent/plugin/out_opensearch.rb +2 -1
- data/test/plugin/test_out_opensearch.rb +33 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baace7e1273a04aa4cb21d218deb85304670857dbb5da3b6f12657504fa742d8
|
4
|
+
data.tar.gz: 0df9e116114cdf34cdcb3029b7fdb3196f7847178c8133837dd0df66859a4c39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 110f000927c80c588f9ba399cef32b1b50ef9334c577adc116a931cba784a2bd230e050c776b3ed6447b1393929843a94e52d6efa620f9d0b3c024eb065b2354
|
7
|
+
data.tar.gz: 7b0a79c72b1f10e7c018dc142a427b40943d38b3b31390ee19ab917287ea6b51ab2a3f38866ecd1de222678be58c2fa18bca3e0c9723cf620a4ca62c337842fd
|
data/.github/workflows/linux.yml
CHANGED
data/.github/workflows/macos.yml
CHANGED
data/History.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
### [Unreleased]
|
4
4
|
|
5
|
+
### 1.0.9
|
6
|
+
- Adjust GitHub workflows (#89)
|
7
|
+
- out\_opensearch: Provide service_name choices for handling serverless (#88)
|
8
|
+
|
9
|
+
### 1.0.8
|
10
|
+
- Use faraday 1.x explicitly (#71)
|
11
|
+
|
5
12
|
### 1.0.7
|
6
13
|
- Expire AWS credentials with a certain interval (#52)
|
7
14
|
|
data/README.md
CHANGED
@@ -1432,7 +1432,7 @@ Specify AWS OpenSearch Service endpoint.
|
|
1432
1432
|
</endpoint>
|
1433
1433
|
```
|
1434
1434
|
|
1435
|
-
**NOTE:** This plugin will remove trailing slashes automatically. You don't need to pay
|
1435
|
+
**NOTE:** This plugin will remove trailing slashes automatically. You don't need to pay attention to the trailing slash characters.
|
1436
1436
|
|
1437
1437
|
#### access_key_id
|
1438
1438
|
|
@@ -1577,6 +1577,19 @@ If you want to expire AWS credentials in certain interval, you should specify `r
|
|
1577
1577
|
</endpoint>
|
1578
1578
|
```
|
1579
1579
|
|
1580
|
+
### Use OpenSearch Serverless
|
1581
|
+
|
1582
|
+
If you want to use Serverless version of OpenSearch service, you have to specify `aoss` in `aws_service_name` under `endpoint` section:
|
1583
|
+
|
1584
|
+
```aconf
|
1585
|
+
<endpoint>
|
1586
|
+
url https://CLUSTER_ENDPOINT_URL
|
1587
|
+
region us-east-2
|
1588
|
+
# ...
|
1589
|
+
aws_service_name aoss # default is es that is for AWS OpenSearch Service not Serverless.
|
1590
|
+
</endpoint>
|
1591
|
+
```
|
1592
|
+
|
1580
1593
|
## Troubleshooting
|
1581
1594
|
|
1582
1595
|
See [Troubleshooting document](README.Troubleshooting.md)
|
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'fluent-plugin-opensearch'
|
6
|
-
s.version = '1.0.
|
6
|
+
s.version = '1.0.9'
|
7
7
|
s.authors = ['Hiroshi Hatake']
|
8
8
|
s.email = ['cosmo0920.wp@gmail.com']
|
9
9
|
s.description = %q{Opensearch output plugin for Fluent event collector}
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_runtime_dependency 'excon', '>= 0'
|
27
27
|
s.add_runtime_dependency 'opensearch-ruby'
|
28
28
|
s.add_runtime_dependency "aws-sdk-core", "~> 3"
|
29
|
+
s.add_runtime_dependency "faraday", "~> 1.10"
|
29
30
|
s.add_runtime_dependency "faraday_middleware-aws-sigv4"
|
30
31
|
|
31
32
|
|
@@ -195,6 +195,7 @@ module Fluent::Plugin
|
|
195
195
|
config_param :assume_role_web_identity_token_file, :string, :default => nil
|
196
196
|
config_param :sts_credentials_region, :string, :default => nil
|
197
197
|
config_param :refresh_credentials_interval, :time, :default => "5h"
|
198
|
+
config_param :aws_service_name, :enum, list: [:es, :aoss], :default => :es
|
198
199
|
end
|
199
200
|
|
200
201
|
config_section :buffer do
|
@@ -622,7 +623,7 @@ module Fluent::Plugin
|
|
622
623
|
lambda do |f|
|
623
624
|
f.request(
|
624
625
|
:aws_sigv4,
|
625
|
-
service:
|
626
|
+
service: @endpoint.aws_service_name.to_s,
|
626
627
|
region: @endpoint.region,
|
627
628
|
credentials: @_aws_credentials,
|
628
629
|
)
|
@@ -315,6 +315,39 @@ class OpenSearchOutputTest < Test::Unit::TestCase
|
|
315
315
|
assert_equal "fluentd", instance.endpoint.assume_role_session_name
|
316
316
|
assert_nil instance.endpoint.assume_role_web_identity_token_file
|
317
317
|
assert_nil instance.endpoint.sts_credentials_region
|
318
|
+
assert_equal :es, instance.endpoint.aws_service_name
|
319
|
+
end
|
320
|
+
|
321
|
+
data("OpenSearch Service" => [:es, 'es'],
|
322
|
+
"OpenSearch Serverless" => [:aoss, 'aoss'])
|
323
|
+
test 'configure endpoint section w/ aws_service_name' do |data|
|
324
|
+
expected, conf = data
|
325
|
+
config = Fluent::Config::Element.new(
|
326
|
+
'ROOT', '', {
|
327
|
+
'@type' => 'opensearch',
|
328
|
+
}, [
|
329
|
+
Fluent::Config::Element.new('endpoint', '', {
|
330
|
+
'url' => "https://search-opensearch.aws.example.com/",
|
331
|
+
'region' => "local",
|
332
|
+
'access_key_id' => 'YOUR_AWESOME_KEY',
|
333
|
+
'secret_access_key' => 'YOUR_AWESOME_SECRET',
|
334
|
+
'aws_service_name' => conf,
|
335
|
+
}, []),
|
336
|
+
Fluent::Config::Element.new('buffer', 'tag', {}, [])
|
337
|
+
|
338
|
+
])
|
339
|
+
instance = driver(config).instance
|
340
|
+
|
341
|
+
assert_equal "https://search-opensearch.aws.example.com", instance.endpoint.url
|
342
|
+
assert_equal "local", instance.endpoint.region
|
343
|
+
assert_equal "YOUR_AWESOME_KEY", instance.endpoint.access_key_id
|
344
|
+
assert_equal "YOUR_AWESOME_SECRET", instance.endpoint.secret_access_key
|
345
|
+
assert_nil instance.endpoint.assume_role_arn
|
346
|
+
assert_nil instance.endpoint.ecs_container_credentials_relative_uri
|
347
|
+
assert_equal "fluentd", instance.endpoint.assume_role_session_name
|
348
|
+
assert_nil instance.endpoint.assume_role_web_identity_token_file
|
349
|
+
assert_nil instance.endpoint.sts_credentials_region
|
350
|
+
assert_equal expected, instance.endpoint.aws_service_name
|
318
351
|
end
|
319
352
|
|
320
353
|
test 'configure compression' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-opensearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi Hatake
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: faraday
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.10'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.10'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: faraday_middleware-aws-sigv4
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|