fluent-plugin-elb-log 0.4.1 → 0.4.2
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/fluent-plugin-elb-log.gemspec +1 -1
- data/lib/fluent/plugin/in_elb_log.rb +29 -4
- data/test/helper.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71fea708525f12dea801f2e95871eae3e3361faa
|
4
|
+
data.tar.gz: b43655a000f3509012cfb5530839ca88c5201fcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6e9a47ae3fd4cc4bc25e2c6b702bdcf6524b998f8844d7afa22f86fbb22e3220e984f4e44092a333112f64f5b081fcd8f42f174ccdbe99e3bf0770864292f15
|
7
|
+
data.tar.gz: c2654c3fc22772b407fe9ca0d06022373544e0011782b5d29f32c662b4b30a344d0fe8b8b991b0a3c0a2e0285842ba87609f3f8e075b2e9e415ca2304c32042f
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-elb-log"
|
7
|
-
spec.version = "0.4.
|
7
|
+
spec.version = "0.4.2"
|
8
8
|
spec.authors = ["shinsaka"]
|
9
9
|
spec.email = ["shinx1265@gmail.com"]
|
10
10
|
spec.summary = "Amazon ELB log input plugin"
|
@@ -180,10 +180,8 @@ class Fluent::Plugin::Elb_LogInput < Fluent::Plugin::Input
|
|
180
180
|
def get_object_keys_from_s3
|
181
181
|
begin
|
182
182
|
object_keys = []
|
183
|
-
|
184
|
-
|
185
|
-
object_keys << content.key
|
186
|
-
end
|
183
|
+
get_object_contents().each do |content|
|
184
|
+
object_keys << content.key
|
187
185
|
end
|
188
186
|
return object_keys
|
189
187
|
rescue => e
|
@@ -209,6 +207,33 @@ class Fluent::Plugin::Elb_LogInput < Fluent::Plugin::Input
|
|
209
207
|
)
|
210
208
|
end
|
211
209
|
|
210
|
+
def get_object_contents()
|
211
|
+
contents = []
|
212
|
+
|
213
|
+
resp = s3_client.list_objects_v2(
|
214
|
+
bucket: @s3_bucketname,
|
215
|
+
prefix: @s3_prefix
|
216
|
+
)
|
217
|
+
|
218
|
+
loop do
|
219
|
+
resp.contents.each do |content|
|
220
|
+
contents << content
|
221
|
+
end
|
222
|
+
|
223
|
+
if !resp.is_truncated
|
224
|
+
return contents
|
225
|
+
end
|
226
|
+
|
227
|
+
resp = s3_client.list_objects_v2(
|
228
|
+
bucket: @s3_bucketname,
|
229
|
+
prefix: @s3_prefix,
|
230
|
+
continuation_token: resp.next_continuation_token
|
231
|
+
)
|
232
|
+
end
|
233
|
+
|
234
|
+
return contents
|
235
|
+
end
|
236
|
+
|
212
237
|
def get_file_from_s3(object_name)
|
213
238
|
begin
|
214
239
|
log.debug "getting object from s3 name is #{object_name}"
|
data/test/helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-elb-log
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shinsaka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|