logstash-output-elasticsearch 0.2.4-java → 0.2.5-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bb85a10c092120788256aa5d94f710bcc7163db
4
- data.tar.gz: 612cd465eb7606aad9dd952d051c601ef2e0e226
3
+ metadata.gz: 4f374dea9399a39320b707ef7f5f378a69b55549
4
+ data.tar.gz: a02cdf7de43d69cefb2c6cd94ff243fd567c95b8
5
5
  SHA512:
6
- metadata.gz: bc8be1e0ee550a2d5103041393c14f465ceb16920a37af0e3386efc7911e1d43d78efb86bf36d0a1642aded4900244fde6578b2f246d9b4ab57aa22d3e5adf2b
7
- data.tar.gz: b8422207b16d23ce6f88176f10b21d9f4d0ec853ecd2390626fd18f3c5555f5d7cb26244d50e105b32cb18ce5637569a17212821f3103e1dd5bfc0846b066dd3
6
+ metadata.gz: 5597b8bbb7e668ff3dfac053d8d9657e2c831e22fa8025836c12b08d1228fd75d9c0c43dea4531de528736b91b96f5ebe093b92994380847335e8c2475267866
7
+ data.tar.gz: 4006335088afc74f35c60472069d70f21b37a54e393ac82182dc79eb9fff8441a9f55f9fdd47cf1638caef2efd9e241a90c5ca8a53c542752ef51a9458bcccf6
@@ -51,7 +51,7 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
51
51
  # similar events to the same 'type'. String expansion `%{foo}` works here.
52
52
  #
53
53
  # Deprecated in favor of `document_type` field.
54
- config :index_type, :validate => :string, :deprecated => true
54
+ config :index_type, :validate => :string, :deprecated => "Please use the 'document_type' setting instead. It has the same effect, but is more appropriately named."
55
55
 
56
56
  # The document type to write events to. Generally you should try to write only
57
57
  # similar events to the same 'type'. String expansion `%{foo}` works here.
@@ -291,7 +291,7 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
291
291
  end
292
292
  end
293
293
 
294
- if @host.nil? && @protocol == "http"
294
+ if @host.nil? && @protocol != "node" # node can use zen discovery
295
295
  @logger.info("No 'host' set in elasticsearch output. Defaulting to localhost")
296
296
  @host = ["localhost"]
297
297
  end
@@ -458,10 +458,9 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
458
458
  public
459
459
  def flush(actions, teardown = false)
460
460
  begin
461
- @logger.debug? and @logger.debug "Sending bulk of actions to client[#{@client_idx}]: #{@host[@client_idx]}"
462
461
  submit(actions)
463
462
  rescue => e
464
- @logger.error "Got error to send bulk of actions to elasticsearch server at #{@host[@client_idx]} : #{e.message}"
463
+ @logger.error "Got error to send bulk of actions: #{e.message}"
465
464
  raise e
466
465
  ensure
467
466
  unless @protocol == "node"
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-elasticsearch'
4
- s.version = '0.2.4'
4
+ s.version = '0.2.5'
5
5
  s.licenses = ['apache-2.0']
6
6
  s.summary = "Logstash Output to Elasticsearch"
7
7
  s.description = "Output events to elasticsearch"
@@ -960,6 +960,30 @@ describe "ship lots of events w/ default index_type and dynamic routing key usin
960
960
 
961
961
  describe "transport protocol" do
962
962
 
963
+ context "host not configured" do
964
+ subject do
965
+ require "logstash/outputs/elasticsearch"
966
+ settings = {
967
+ "protocol" => "transport",
968
+ "node_name" => "mynode"
969
+ }
970
+ next LogStash::Outputs::ElasticSearch.new(settings)
971
+ end
972
+
973
+ it "should set host to localhost" do
974
+ expect(LogStash::Outputs::Elasticsearch::Protocols::TransportClient).to receive(:new).with({
975
+ :host => "localhost",
976
+ :port => "9300-9305",
977
+ :protocol => "transport",
978
+ :client_settings => {
979
+ "client.transport.sniff" => false,
980
+ "node.name" => "mynode"
981
+ }
982
+ })
983
+ subject.register
984
+ end
985
+ end
986
+
963
987
  context "sniffing => true" do
964
988
 
965
989
  subject do
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: 0.2.4
4
+ version: 0.2.5
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-21 00:00:00.000000000 Z
11
+ date: 2015-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  version: '0'
213
213
  requirements: []
214
214
  rubyforge_project:
215
- rubygems_version: 2.4.5
215
+ rubygems_version: 2.1.9
216
216
  signing_key:
217
217
  specification_version: 4
218
218
  summary: Logstash Output to Elasticsearch