logstash-output-s3 2.0.4 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/lib/logstash/outputs/s3.rb +17 -1
- data/logstash-output-s3.gemspec +2 -3
- data/spec/integration/s3_spec.rb +2 -2
- data/spec/outputs/s3_spec.rb +12 -0
- metadata +20 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80e75152fb124d5936f0fd110072509a69845f52
|
4
|
+
data.tar.gz: 407179b921a6f00a8ea5357d39db6f12525e87e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7a5a417febef05d0f6591f93d1ce3a9192ed327729f1296736c43fb5570b41412c6cf0aefc3215a4fcd88e8faf4cfedb2e8cbbe8cd19d61e0038890c674dda9
|
7
|
+
data.tar.gz: f9446f247c8a768367a6df7c0829d5cd8471724f1a329b3c75297c03e76f0421b2155cb17401060a6dfc7adbf28dcca983ba936f3eda44eee1e68dca1363c6a1
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,18 @@
|
|
1
|
+
# 2.0.7
|
2
|
+
- Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
|
3
|
+
# 2.0.6
|
4
|
+
- New dependency requirements for logstash-core for the 5.0 release
|
5
|
+
## 2.0.5
|
6
|
+
- Support signature_version option for v4 S3 keys
|
1
7
|
## 2.0.4
|
2
8
|
- Remove the `Time.now` stub in the spec, it was conflicting with other test when running inside the default plugins test #63
|
3
9
|
- Make the spec run faster by adjusting the values of time rotation test.
|
10
|
+
## 2.0.3
|
11
|
+
- Update deps for logstash 2.0
|
4
12
|
## 2.0.2
|
5
13
|
- Fixes an issue when tags were defined #39
|
6
14
|
## 2.0.0
|
7
|
-
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
|
15
|
+
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
|
8
16
|
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
|
9
17
|
- Dependency on logstash-core update to 2.0
|
10
18
|
|
data/lib/logstash/outputs/s3.rb
CHANGED
@@ -109,6 +109,10 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
|
|
109
109
|
# Specify how many workers to use to upload the files to S3
|
110
110
|
config :upload_workers_count, :validate => :number, :default => 1
|
111
111
|
|
112
|
+
# The version of the S3 signature hash to use. Normally uses the internal client default, can be explicitly
|
113
|
+
# specified here
|
114
|
+
config :signature_version, :validate => ['v2', 'v4']
|
115
|
+
|
112
116
|
# Define tags to be appended to the file on the S3 bucket.
|
113
117
|
#
|
114
118
|
# Example:
|
@@ -126,7 +130,19 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
|
|
126
130
|
|
127
131
|
def aws_s3_config
|
128
132
|
@logger.info("Registering s3 output", :bucket => @bucket, :endpoint_region => @region)
|
129
|
-
@s3 = AWS::S3.new(
|
133
|
+
@s3 = AWS::S3.new(full_options)
|
134
|
+
end
|
135
|
+
|
136
|
+
def full_options
|
137
|
+
aws_options_hash.merge(signature_options)
|
138
|
+
end
|
139
|
+
|
140
|
+
def signature_options
|
141
|
+
if @signature_version
|
142
|
+
{:s3_signature_version => @signature_version}
|
143
|
+
else
|
144
|
+
{}
|
145
|
+
end
|
130
146
|
end
|
131
147
|
|
132
148
|
def aws_service_endpoint(region)
|
data/logstash-output-s3.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-s3'
|
4
|
-
s.version = '2.0.
|
4
|
+
s.version = '2.0.7'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "This plugin was created for store the logstash's events into Amazon Simple Storage Service (Amazon S3)"
|
7
7
|
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|
@@ -20,11 +20,10 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
|
21
21
|
|
22
22
|
# Gem dependencies
|
23
|
-
s.add_runtime_dependency "logstash-core", "
|
23
|
+
s.add_runtime_dependency "logstash-core-plugin-api", "~> 1.0"
|
24
24
|
s.add_runtime_dependency 'logstash-mixin-aws'
|
25
25
|
s.add_runtime_dependency 'stud', '~> 0.0.22'
|
26
26
|
s.add_development_dependency 'logstash-devutils'
|
27
27
|
s.add_development_dependency 'logstash-input-generator'
|
28
28
|
s.add_development_dependency 'logstash-codec-line'
|
29
29
|
end
|
30
|
-
|
data/spec/integration/s3_spec.rb
CHANGED
@@ -23,7 +23,7 @@ describe LogStash::Outputs::S3, :integration => true, :s3 => true do
|
|
23
23
|
s3output.s3
|
24
24
|
end
|
25
25
|
|
26
|
-
after(:
|
26
|
+
after(:each) do
|
27
27
|
delete_matching_keys_on_bucket('studtmp')
|
28
28
|
delete_matching_keys_on_bucket('my-prefix')
|
29
29
|
end
|
@@ -36,7 +36,7 @@ describe LogStash::Outputs::S3, :integration => true, :s3 => true do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
describe "#write_on_bucket" do
|
39
|
-
after(:
|
39
|
+
after(:each) do
|
40
40
|
File.unlink(fake_data.path)
|
41
41
|
end
|
42
42
|
|
data/spec/outputs/s3_spec.rb
CHANGED
@@ -31,6 +31,18 @@ describe LogStash::Outputs::S3 do
|
|
31
31
|
s3 = LogStash::Outputs::S3.new(config.merge({ "region" => 'sa-east-1' }))
|
32
32
|
expect(s3.aws_options_hash).to include(:s3_endpoint => "s3-sa-east-1.amazonaws.com")
|
33
33
|
end
|
34
|
+
|
35
|
+
describe "signature version" do
|
36
|
+
it "should set the signature version if specified" do
|
37
|
+
s3 = LogStash::Outputs::S3.new(config.merge({ "signature_version" => 'v4' }))
|
38
|
+
expect(s3.full_options[:s3_signature_version]).to eql('v4')
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should omit the option completely if not specified" do
|
42
|
+
s3 = LogStash::Outputs::S3.new(config)
|
43
|
+
expect(s3.full_options.has_key?(:s3_signature_version)).to eql(false)
|
44
|
+
end
|
45
|
+
end
|
34
46
|
end
|
35
47
|
|
36
48
|
describe "#register" do
|
metadata
CHANGED
@@ -1,39 +1,33 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- -
|
16
|
+
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version:
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 3.0.0
|
22
|
-
name: logstash-core
|
18
|
+
version: '1.0'
|
19
|
+
name: logstash-core-plugin-api
|
23
20
|
prerelease: false
|
24
21
|
type: :runtime
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 2.0.0.beta2
|
30
|
-
- - <
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
26
|
+
version: '1.0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
requirement: !ruby/object:Gem::Requirement
|
35
29
|
requirements:
|
36
|
-
- -
|
30
|
+
- - ">="
|
37
31
|
- !ruby/object:Gem::Version
|
38
32
|
version: '0'
|
39
33
|
name: logstash-mixin-aws
|
@@ -41,13 +35,13 @@ dependencies:
|
|
41
35
|
type: :runtime
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
43
37
|
requirements:
|
44
|
-
- -
|
38
|
+
- - ">="
|
45
39
|
- !ruby/object:Gem::Version
|
46
40
|
version: '0'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
requirement: !ruby/object:Gem::Requirement
|
49
43
|
requirements:
|
50
|
-
- - ~>
|
44
|
+
- - "~>"
|
51
45
|
- !ruby/object:Gem::Version
|
52
46
|
version: 0.0.22
|
53
47
|
name: stud
|
@@ -55,13 +49,13 @@ dependencies:
|
|
55
49
|
type: :runtime
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
51
|
requirements:
|
58
|
-
- - ~>
|
52
|
+
- - "~>"
|
59
53
|
- !ruby/object:Gem::Version
|
60
54
|
version: 0.0.22
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
requirement: !ruby/object:Gem::Requirement
|
63
57
|
requirements:
|
64
|
-
- -
|
58
|
+
- - ">="
|
65
59
|
- !ruby/object:Gem::Version
|
66
60
|
version: '0'
|
67
61
|
name: logstash-devutils
|
@@ -69,13 +63,13 @@ dependencies:
|
|
69
63
|
type: :development
|
70
64
|
version_requirements: !ruby/object:Gem::Requirement
|
71
65
|
requirements:
|
72
|
-
- -
|
66
|
+
- - ">="
|
73
67
|
- !ruby/object:Gem::Version
|
74
68
|
version: '0'
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
70
|
requirement: !ruby/object:Gem::Requirement
|
77
71
|
requirements:
|
78
|
-
- -
|
72
|
+
- - ">="
|
79
73
|
- !ruby/object:Gem::Version
|
80
74
|
version: '0'
|
81
75
|
name: logstash-input-generator
|
@@ -83,13 +77,13 @@ dependencies:
|
|
83
77
|
type: :development
|
84
78
|
version_requirements: !ruby/object:Gem::Requirement
|
85
79
|
requirements:
|
86
|
-
- -
|
80
|
+
- - ">="
|
87
81
|
- !ruby/object:Gem::Version
|
88
82
|
version: '0'
|
89
83
|
- !ruby/object:Gem::Dependency
|
90
84
|
requirement: !ruby/object:Gem::Requirement
|
91
85
|
requirements:
|
92
|
-
- -
|
86
|
+
- - ">="
|
93
87
|
- !ruby/object:Gem::Version
|
94
88
|
version: '0'
|
95
89
|
name: logstash-codec-line
|
@@ -97,7 +91,7 @@ dependencies:
|
|
97
91
|
type: :development
|
98
92
|
version_requirements: !ruby/object:Gem::Requirement
|
99
93
|
requirements:
|
100
|
-
- -
|
94
|
+
- - ">="
|
101
95
|
- !ruby/object:Gem::Version
|
102
96
|
version: '0'
|
103
97
|
description: This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program
|
@@ -130,17 +124,17 @@ require_paths:
|
|
130
124
|
- lib
|
131
125
|
required_ruby_version: !ruby/object:Gem::Requirement
|
132
126
|
requirements:
|
133
|
-
- -
|
127
|
+
- - ">="
|
134
128
|
- !ruby/object:Gem::Version
|
135
129
|
version: '0'
|
136
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
131
|
requirements:
|
138
|
-
- -
|
132
|
+
- - ">="
|
139
133
|
- !ruby/object:Gem::Version
|
140
134
|
version: '0'
|
141
135
|
requirements: []
|
142
136
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.4.
|
137
|
+
rubygems_version: 2.4.8
|
144
138
|
signing_key:
|
145
139
|
specification_version: 4
|
146
140
|
summary: This plugin was created for store the logstash's events into Amazon Simple Storage Service (Amazon S3)
|