logstash-output-elasticsearch 2.6.1-java → 2.6.2-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5551c54f0e8b203365e73483a7db20333db6d333
4
- data.tar.gz: 9c5c987d0fc748b76d253c275cfa698ae26874c5
3
+ metadata.gz: 0e498531e88fe7f64902a58f2b8c78692e53fe50
4
+ data.tar.gz: 649251ac66818877c41c3fd09415fcabcbaf4887
5
5
  SHA512:
6
- metadata.gz: 7dd6e24625c9c7426be50acd16c7926b4b08ea4f23a6e7c3876015a39a0a34599d98490b515b21f965357a204fedad42b55d261a53c420d09e17d23eb68c86c5
7
- data.tar.gz: 9d69f8a3c0a888ce32a754a40ad84b28d261d43286f09f595a556f048564f0277ea2463be8dc978b596e9f28f5a1c7acaf759e5120676817e940cd6997c9b375
6
+ metadata.gz: 37f1ad94ed0a96818dd4abe9290d5b40b43a61956fda40e2f68552579b0a6f7764b3ed1f3cef3fa6e228a0bbe63960a1f37a8d6fd172d10320d52d053f6fe1f2
7
+ data.tar.gz: 65d29533998b3a822c3a98a9867fd987158c89180060e4685797bcb94891356669827354fe86a245dbe736d9f516b7c2664c1f01cd97ef465f1199ac3fe82078
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 2.6.2
2
+ - Fix bug where update index actions would not work with events with 'data' field
3
+
1
4
  ## 2.6.1
2
5
  - Add 'retry_on_conflict' configuration option which should have been here from the beginning
3
6
 
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>
1
+ Copyright (c) 2012–2016 Elasticsearch <http://www.elastic.co>
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -67,7 +67,12 @@ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
67
67
  ```
68
68
  - Install plugin
69
69
  ```sh
70
+ # Logstash 2.3 and higher
71
+ bin/logstah-plugin install --no-verify
72
+
73
+ # Prior to Logstash 2.3
70
74
  bin/plugin install --no-verify
75
+
71
76
  ```
72
77
  - Run Logstash with your plugin
73
78
  ```sh
@@ -85,7 +90,12 @@ gem build logstash-filter-awesome.gemspec
85
90
  ```
86
91
  - Install the plugin from the Logstash home
87
92
  ```sh
88
- bin/plugin install /your/local/plugin/logstash-filter-awesome.gem
93
+ # Logstash 2.3 and higher
94
+ bin/logstah-plugin install --no-verify
95
+
96
+ # Prior to Logstash 2.3
97
+ bin/plugin install --no-verify
98
+
89
99
  ```
90
100
  - Start Logstash and proceed to test the plugin
91
101
 
@@ -44,7 +44,7 @@ module LogStash; module Outputs; class ElasticSearch;
44
44
  args, source = update_action_builder(args, source) if action == 'update'
45
45
 
46
46
  if source && action != 'delete'
47
- next [ { action => args }, source ]
47
+ next [ { action => args.merge({ :data => source }) } ]
48
48
  else
49
49
  next { action => args }
50
50
  end
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-elasticsearch'
4
- s.version = '2.6.1'
4
+ s.version = '2.6.2'
5
5
  s.licenses = ['apache-2.0']
6
6
  s.summary = "Logstash Output to Elasticsearch"
7
- s.description = "Output events to elasticsearch"
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'
10
10
  s.homepage = "http://logstash.net/"
@@ -53,8 +53,20 @@ describe "Update actions", :integration => true do
53
53
  r = @es.get(:index => 'logstash-update', :type => 'logs', :id => "123", :refresh => true)
54
54
  insist { r["_source"]["message"] } == 'updated message here'
55
55
  end
56
+
57
+ # The es ruby client treats the data field differently. Make sure this doesn't
58
+ # raise an exception
59
+ it "should update an existing document that has a 'data' field" do
60
+ subject = get_es_output({ 'document_id' => "123" })
61
+ subject.register
62
+ subject.receive(LogStash::Event.new("data" => "updated message here", "message" => "foo"))
63
+ subject.flush
64
+ r = @es.get(:index => 'logstash-update', :type => 'logs', :id => "123", :refresh => true)
65
+ insist { r["_source"]["data"] } == 'updated message here'
66
+ insist { r["_source"]["message"] } == 'foo'
67
+ end
56
68
  end
57
-
69
+
58
70
  context "when using script" do
59
71
  it "should increment a counter with event/doc 'count' variable" do
60
72
  subject = get_es_output({ 'document_id' => "123", 'script' => 'scripted_update', 'script_type' => 'file' })
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-08 00:00:00.000000000 Z
11
+ date: 2016-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -182,7 +182,7 @@ dependencies:
182
182
  version: '0'
183
183
  prerelease: false
184
184
  type: :development
185
- description: Output events to elasticsearch
185
+ 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
186
186
  email: info@elastic.co
187
187
  executables: []
188
188
  extensions: []