fluent-plugin-elb-log 1.0.0 → 1.0.1
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 +8 -5
- 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: 73ccee68acfc7e347ceef8da49a04e1ae0068e75
|
|
4
|
+
data.tar.gz: 125177a377574bd78ec55e5c26ffc09b0fcab39c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b2b8ba564e4a19721fc5554a776353774fea70a9c943dd87f4c733501c3c200ebb041e7f7747dc8e92483fff04394e7bc7bd013b7b0574c495cbf7b1f1ba806a
|
|
7
|
+
data.tar.gz: 1624b3196b41d761918e8c2d2229493c76dc1fd4710a05c002ed93c8678fd355dd054a48f79f8e5ab3f1b3bd3f2850152ac1c8d3800947ae18eca2ee06e5f660
|
|
@@ -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 = "1.0.
|
|
7
|
+
spec.version = "1.0.1"
|
|
8
8
|
spec.authors = ["shinsaka"]
|
|
9
9
|
spec.email = ["shinx1265@gmail.com"]
|
|
10
10
|
spec.summary = "Amazon ELB log input plugin"
|
|
@@ -70,8 +70,8 @@ class Fluent::Plugin::Elb_LogInput < Fluent::Plugin::Input
|
|
|
70
70
|
log.debug "timestamp file #{@timestamp_file} read"
|
|
71
71
|
File.open(@timestamp_file, File::RDONLY) do |file|
|
|
72
72
|
if file.size > 0
|
|
73
|
-
timestamp_from_file = file.read.to_i
|
|
74
|
-
if timestamp_from_file > timestamp
|
|
73
|
+
timestamp_from_file = file.read.to_i
|
|
74
|
+
if timestamp_from_file > timestamp
|
|
75
75
|
timestamp = timestamp_from_file
|
|
76
76
|
end
|
|
77
77
|
end
|
|
@@ -196,7 +196,7 @@ class Fluent::Plugin::Elb_LogInput < Fluent::Plugin::Input
|
|
|
196
196
|
|
|
197
197
|
object_key = content.key
|
|
198
198
|
node_no = Digest::SHA1.hexdigest(object_key).to_i(16) % @num_nodes
|
|
199
|
-
next unless node_no == @node_no
|
|
199
|
+
next unless node_no == @node_no
|
|
200
200
|
|
|
201
201
|
matches = LOGFILE_REGEXP.match(object_key)
|
|
202
202
|
if s3_last_modified_unixtime > timestamp and matches
|
|
@@ -286,7 +286,10 @@ class Fluent::Plugin::Elb_LogInput < Fluent::Plugin::Input
|
|
|
286
286
|
next
|
|
287
287
|
end
|
|
288
288
|
|
|
289
|
-
|
|
289
|
+
now = Fluent::Engine.now
|
|
290
|
+
time = Time.parse(line_match[:time]).to_i rescue now
|
|
291
|
+
|
|
292
|
+
router.emit(@tag, time, record_common.merge(format_record(line_match)))
|
|
290
293
|
end
|
|
291
294
|
end
|
|
292
295
|
rescue => e
|
|
@@ -320,4 +323,4 @@ class Fluent::Plugin::Elb_LogInput < Fluent::Plugin::Input
|
|
|
320
323
|
"option3" => item[:option3]
|
|
321
324
|
}
|
|
322
325
|
end
|
|
323
|
-
end
|
|
326
|
+
end
|
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: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- shinsaka
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-12-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fluentd
|