logstash-codec-bulk_es 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/codecs/bulk_es.rb +9 -1
- data/logstash-codec-bulk_es.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44cdb572191ef2068b39fff37f87d1eaf4717645
|
4
|
+
data.tar.gz: 84cc6646da86bb301b4b75d776217104be74d1a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fde5ab13408ff4e8f0124fb047bda9a564ee121c39899b29143f8e6f222721614a31c341de950bbd89af9b5ea61985ba17373ca2321e14b59172e99850565e42
|
7
|
+
data.tar.gz: 732dce625eb78d10ea236783a0471f2fbd1d9dcf52bf06c7727b1eb5f7d80c95fca1bb99317949e50832b857eb6cbddaf04898706b1616a10b527065af14d7e5
|
@@ -24,7 +24,15 @@ class LogStash::Codecs::BulkEs < LogStash::Codecs::Base
|
|
24
24
|
line = LogStash::Json.load(bulk_message.get("message"))
|
25
25
|
case @state
|
26
26
|
when :metadata
|
27
|
-
|
27
|
+
if @metadata["action"] == 'update'
|
28
|
+
if line.has_key?("doc")
|
29
|
+
event = LogStash::Event.new(line["doc"])
|
30
|
+
elsif
|
31
|
+
event = LogStash::Event.new(line)
|
32
|
+
end
|
33
|
+
elsif
|
34
|
+
event = LogStash::Event.new(line)
|
35
|
+
end
|
28
36
|
event.set("@metadata", @metadata)
|
29
37
|
yield event
|
30
38
|
@state = :start
|