fluent-plugin-opensearch 1.0.6 → 1.0.7
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/History.md +3 -0
- data/README.md +13 -0
- data/fluent-plugin-opensearch.gemspec +1 -1
- data/lib/fluent/plugin/out_opensearch.rb +18 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c44bf1e420cb64daf8b5a2f21f38c47e692ed31feb0bd400189e737c19e819df
|
4
|
+
data.tar.gz: 896882755f7394472a8a4874a7a48786c50aee729b283e7be32818edcacc3e0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0718cd172d5549040faad8698a09eeeb9f5aadb00e19ab994d406143fa8789f20ce18e5b7526d9697822036c39f99aa96bdeeaace50b0b412f209d4057a3f5b
|
7
|
+
data.tar.gz: 59f7c8c735f4df3f69d4bc618df0653f00db191bd7c85f1a498509486f3fd7040073763436b0833279e24bdc52cf57b0a61322e896257a0e6ba6f19af9bc49e1
|
data/History.md
CHANGED
data/README.md
CHANGED
@@ -1564,6 +1564,19 @@ In this case, the endpoint configuration looks like:
|
|
1564
1564
|
</endpoint>
|
1565
1565
|
```
|
1566
1566
|
|
1567
|
+
### Expiring AWS credentials
|
1568
|
+
|
1569
|
+
If you want to expire AWS credentials in certain interval, you should specify `refresh_credentials_interval` parameter under `endpoint` section:
|
1570
|
+
|
1571
|
+
```aconf
|
1572
|
+
<endpoint>
|
1573
|
+
url https://CLUSTER_ENDPOINT_URL
|
1574
|
+
region eu-west-1
|
1575
|
+
# ...
|
1576
|
+
refresh_credentials_interval 3h # default is 5h (five hours).
|
1577
|
+
</endpoint>
|
1578
|
+
```
|
1579
|
+
|
1567
1580
|
## Troubleshooting
|
1568
1581
|
|
1569
1582
|
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.7'
|
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}
|
@@ -194,6 +194,7 @@ module Fluent::Plugin
|
|
194
194
|
config_param :assume_role_session_name, :string, :default => "fluentd"
|
195
195
|
config_param :assume_role_web_identity_token_file, :string, :default => nil
|
196
196
|
config_param :sts_credentials_region, :string, :default => nil
|
197
|
+
config_param :refresh_credentials_interval, :time, :default => "5h"
|
197
198
|
end
|
198
199
|
|
199
200
|
config_section :buffer do
|
@@ -336,6 +337,22 @@ module Fluent::Plugin
|
|
336
337
|
}
|
337
338
|
end
|
338
339
|
end
|
340
|
+
# If AWS credentials is set, consider to expire credentials information forcibly before expired.
|
341
|
+
@credential_mutex = Mutex.new
|
342
|
+
if @endpoint
|
343
|
+
@_aws_credentials = aws_credentials(@endpoint)
|
344
|
+
|
345
|
+
if @endpoint.refresh_credentials_interval
|
346
|
+
timer_execute(:out_opensearch_expire_credentials, @endpoint.refresh_credentials_interval) do
|
347
|
+
log.debug('Recreate the AWS credentials')
|
348
|
+
|
349
|
+
@credential_mutex.synchronize do
|
350
|
+
@_os = nil
|
351
|
+
@_aws_credentials = aws_credentials(@endpoint)
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
355
|
+
end
|
339
356
|
|
340
357
|
@serializer_class = nil
|
341
358
|
begin
|
@@ -607,7 +624,7 @@ module Fluent::Plugin
|
|
607
624
|
:aws_sigv4,
|
608
625
|
service: 'es',
|
609
626
|
region: @endpoint.region,
|
610
|
-
credentials:
|
627
|
+
credentials: @_aws_credentials,
|
611
628
|
)
|
612
629
|
|
613
630
|
f.adapter @http_backend, @backend_options
|
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.7
|
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-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|