logstash-input-elasticsearch 4.0.6 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +6 -0
- data/lib/logstash/inputs/elasticsearch.rb +2 -1
- data/logstash-input-elasticsearch.gemspec +2 -2
- data/spec/inputs/elasticsearch_spec.rb +21 -0
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b5af8082f8aad876b3e67645560651a1e3d4f7712f52619f138fe8fe8b312b8f
|
4
|
+
data.tar.gz: 0c0fbd86007d4ad7ed62366e5b8e326103539a1b0de8a65f6ce90f8c7796dfd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8010e3abb6ea0c5bf2bf3c0b25d66a541bdd9c99a23e5d654cadec5571291cfe94a076f628526ca407f8715b4c566d953f37d9194d1924e565f386249fb74e4c
|
7
|
+
data.tar.gz: 7f30e0c6da1bad57e60d6f072a4bea5d60226f98af399b4f45e984635c81c9717c58fb1212cecc6a9c846fc18593105180183b6f33539b20143ac7a8cccc1d4e
|
data/CHANGELOG.md
CHANGED
@@ -170,7 +170,6 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
|
|
170
170
|
|
171
171
|
def push_hit(hit, output_queue)
|
172
172
|
event = LogStash::Event.new(hit['_source'])
|
173
|
-
decorate(event)
|
174
173
|
|
175
174
|
if @docinfo
|
176
175
|
# do not assume event[@docinfo_target] to be in-place updatable. first get it, update it, then at the end set it in the event.
|
@@ -190,6 +189,8 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
|
|
190
189
|
event.set(@docinfo_target, docinfo_target)
|
191
190
|
end
|
192
191
|
|
192
|
+
decorate(event)
|
193
|
+
|
193
194
|
output_queue << event
|
194
195
|
end
|
195
196
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-elasticsearch'
|
4
|
-
s.version = '4.
|
4
|
+
s.version = '4.1.1'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
|
-
s.summary = "
|
6
|
+
s.summary = "Reads query results from an Elasticsearch cluster"
|
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/logstash-plugin install gemname. This gem is not a stand-alone program"
|
8
8
|
s.authors = ["Elastic"]
|
9
9
|
s.email = 'info@elastic.co'
|
@@ -228,6 +228,27 @@ describe LogStash::Inputs::Elasticsearch do
|
|
228
228
|
expect(event.get("[@metadata][_index]")).to eq('logstash-2014.10.12')
|
229
229
|
expect(event.get("[@metadata][_id]")).to eq(nil)
|
230
230
|
end
|
231
|
+
|
232
|
+
it 'should be able to reference metadata fields in `add_field` decorations' do
|
233
|
+
config = %q[
|
234
|
+
input {
|
235
|
+
elasticsearch {
|
236
|
+
hosts => ["localhost"]
|
237
|
+
query => '{ "query": { "match": { "city_name": "Okinawa" } }, "fields": ["message"] }'
|
238
|
+
docinfo => true
|
239
|
+
add_field => {
|
240
|
+
'identifier' => "foo:%{[@metadata][_type]}:%{[@metadata][_id]}"
|
241
|
+
}
|
242
|
+
}
|
243
|
+
}
|
244
|
+
]
|
245
|
+
|
246
|
+
event = input(config) do |pipeline, queue|
|
247
|
+
queue.pop
|
248
|
+
end
|
249
|
+
|
250
|
+
expect(event.get('identifier')).to eq('foo:logs:C5b2xLQwTZa76jBmHIbwHQ')
|
251
|
+
end
|
231
252
|
end
|
232
253
|
|
233
254
|
context "when not defining the docinfo" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,7 +78,9 @@ dependencies:
|
|
78
78
|
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
|
-
description: This gem is a Logstash plugin required to be installed on top of the
|
81
|
+
description: This gem is a Logstash plugin required to be installed on top of the
|
82
|
+
Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
|
83
|
+
gem is not a stand-alone program
|
82
84
|
email: info@elastic.co
|
83
85
|
executables: []
|
84
86
|
extensions: []
|
@@ -116,9 +118,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
118
|
version: '0'
|
117
119
|
requirements: []
|
118
120
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.6.11
|
120
122
|
signing_key:
|
121
123
|
specification_version: 4
|
122
|
-
summary:
|
124
|
+
summary: Reads query results from an Elasticsearch cluster
|
123
125
|
test_files:
|
124
126
|
- spec/inputs/elasticsearch_spec.rb
|