fluent-plugin-s3 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -4
- data/ChangeLog +6 -0
- data/README.md +4 -0
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_s3.rb +10 -6
- data/test/test_out_s3.rb +13 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9d2e9c4b652b764291098f4f78295936bc061ae
|
4
|
+
data.tar.gz: bab3ab13e4fae1ff603197db57b86830ec22d532
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 920ccb7def0e7cb1dffd101d993b89a3d8206a4d643aa81452762561f90e25905dd107e7324f531fda4b1a37b0ad54ba0b0c1a2a430c5041ac6fc6e6e5699817
|
7
|
+
data.tar.gz: f2ff65f0e35ce52517e32a3cef95ad1e3da873f96b9dc03fe01af65ae08fd0db5f1a424feb5920e163427743dfa38b359b659f408cda42d3a56ee25162193f9b
|
data/.travis.yml
CHANGED
@@ -6,9 +6,8 @@ rvm:
|
|
6
6
|
- 2.1
|
7
7
|
- 2.2.3
|
8
8
|
- 2.3.1
|
9
|
-
- 2.4.0
|
9
|
+
- 2.4.0
|
10
10
|
- ruby-head
|
11
|
-
- rbx
|
12
11
|
|
13
12
|
gemfile:
|
14
13
|
- Gemfile
|
@@ -17,6 +16,7 @@ gemfile:
|
|
17
16
|
branches:
|
18
17
|
only:
|
19
18
|
- master
|
19
|
+
- v0.12
|
20
20
|
|
21
21
|
before_install: gem update bundler
|
22
22
|
script: bundle exec rake test
|
@@ -27,11 +27,10 @@ matrix:
|
|
27
27
|
allow_failures:
|
28
28
|
- rvm: 1.9.3
|
29
29
|
- rvm: ruby-head
|
30
|
-
- rvm: rbx
|
31
30
|
exclude:
|
32
31
|
- rvm: 1.9.3
|
33
32
|
gemfile: Gemfile
|
34
33
|
- rvm: 2.0
|
35
34
|
gemfile: Gemfile
|
36
|
-
- rvm: 2.4.0
|
35
|
+
- rvm: 2.4.0
|
37
36
|
gemfile: Gemfile.v0.12
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -77,6 +77,10 @@ recommend using `s3_region` instead of `s3_endpoint`.
|
|
77
77
|
endpoint for S3 compatible services. For example, Riak CS based storage or
|
78
78
|
something. This option doesn't work on S3, use `s3_region` instead.
|
79
79
|
|
80
|
+
**ssl_verify_peer**
|
81
|
+
|
82
|
+
Verify SSL certificate of the endpoint. Default is true. Set false when you want to ignore the endpoint SSL certificate.
|
83
|
+
|
80
84
|
**s3_object_key_format**
|
81
85
|
|
82
86
|
The format of S3 object keys. You can use several built-in variables:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.1
|
data/lib/fluent/plugin/out_s3.rb
CHANGED
@@ -77,6 +77,8 @@ module Fluent
|
|
77
77
|
config_param :s3_region, :string, :default => ENV["AWS_REGION"] || "us-east-1"
|
78
78
|
desc "Use 's3_region' instead"
|
79
79
|
config_param :s3_endpoint, :string, :default => nil
|
80
|
+
desc "If false, the certificate of endpoint will not be verified"
|
81
|
+
config_param :ssl_verify_peer, :bool, :default => true
|
80
82
|
desc "The format of S3 object keys"
|
81
83
|
config_param :s3_object_key_format, :string, :default => "%{path}%{time_slice}_%{index}.%{file_extension}"
|
82
84
|
desc "If true, the bucket name is always left in the request URI and never moved to the host as a sub-domain"
|
@@ -161,7 +163,8 @@ module Fluent
|
|
161
163
|
@storage_class = "REDUCED_REDUNDANCY"
|
162
164
|
end
|
163
165
|
|
164
|
-
@
|
166
|
+
@path = process_deprecated_placeholders(@path)
|
167
|
+
@s3_object_key_format = process_deprecated_placeholders(@s3_object_key_format)
|
165
168
|
@values_for_s3_object_chunk = {}
|
166
169
|
end
|
167
170
|
|
@@ -173,6 +176,7 @@ module Fluent
|
|
173
176
|
options[:force_path_style] = @force_path_style
|
174
177
|
options[:compute_checksums] = @compute_checksums unless @compute_checksums.nil?
|
175
178
|
options[:signature_version] = @signature_version unless @signature_version.nil?
|
179
|
+
options[:ssl_verify_peer] = @ssl_verify_peer
|
176
180
|
|
177
181
|
s3_client = Aws::S3::Client.new(options)
|
178
182
|
@s3 = Aws::S3::Resource.new(:client => s3_client)
|
@@ -305,14 +309,14 @@ module Fluent
|
|
305
309
|
end
|
306
310
|
end
|
307
311
|
|
308
|
-
def
|
312
|
+
def process_deprecated_placeholders(target_path)
|
309
313
|
%W(%{uuid} %{uuid:random} %{uuid:hostname} %{uuid:timestamp}).each { |ph|
|
310
|
-
if
|
311
|
-
raise ConfigError, %!#{ph} placeholder
|
314
|
+
if target_path.include?(ph)
|
315
|
+
raise ConfigError, %!#{ph} placeholder is removed!
|
312
316
|
end
|
313
317
|
}
|
314
318
|
|
315
|
-
if
|
319
|
+
if target_path.include?('%{uuid_flush}')
|
316
320
|
# test uuidtools works or not
|
317
321
|
begin
|
318
322
|
require 'uuidtools'
|
@@ -327,7 +331,7 @@ module Fluent
|
|
327
331
|
@uuid_flush_enabled = true
|
328
332
|
end
|
329
333
|
|
330
|
-
|
334
|
+
target_path.gsub('%{hostname}') { |expr|
|
331
335
|
log.warn "%{hostname} will be removed in the future. Use \"\#{Socket.gethostname}\" instead"
|
332
336
|
Socket.gethostname
|
333
337
|
}
|
data/test/test_out_s3.rb
CHANGED
@@ -129,6 +129,19 @@ class S3OutputTest < Test::Unit::TestCase
|
|
129
129
|
assert_equal false, d.instance.check_object
|
130
130
|
end
|
131
131
|
|
132
|
+
def test_config_with_hostname_placeholder
|
133
|
+
d = create_driver(<<EOC)
|
134
|
+
aws_key_id test_key_id
|
135
|
+
aws_sec_key test_sec_key
|
136
|
+
s3_bucket test_bucket
|
137
|
+
path log/%{hostname}/test
|
138
|
+
s3_object_key_format %{path}%{hostname}_%{index}
|
139
|
+
buffer_type memory
|
140
|
+
EOC
|
141
|
+
assert_match /#{Socket.gethostname}/, d.instance.s3_object_key_format
|
142
|
+
assert_match /#{Socket.gethostname}/, d.instance.path
|
143
|
+
end
|
144
|
+
|
132
145
|
def test_path_slicing
|
133
146
|
config = CONFIG.clone.gsub(/path\slog/, "path log/%Y/%m/%d")
|
134
147
|
d = create_driver(config)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-01-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.5.
|
171
|
+
rubygems_version: 2.5.2
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Amazon S3 output plugin for Fluentd event collector
|