logstash-output-elasticsearch_java 2.0.0.beta7 → 2.0.0.beta8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/outputs/elasticsearch_java.rb +36 -32
- data/logstash-output-elasticsearch_java.gemspec +2 -2
- metadata +6 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cc68f0377369395c84e8c81fa063502036434ba
|
4
|
+
data.tar.gz: f68f93cf3a38cc07ebaedfea32d982752929852f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9f328eaafb34804e5dbbc2ff4658da8e56f12caa430b62a527cd40012ff759feaa33233618ec059862b38076ddbf9bb2f0c5a9a0e831fc90699be7dba20d477
|
7
|
+
data.tar.gz: c0ddb4d3e5ba928460f98682ff9755d4d20cae11e30e0239862ae47b6ea6be70c8743dd55c61512ce2e23145c2e5feefdbfdc9bc1c827d68a1f48c6bed1e5fda
|
@@ -308,42 +308,11 @@ class LogStash::Outputs::ElasticSearchJava < LogStash::Outputs::Base
|
|
308
308
|
raise LogStash::ConfigurationError, "network_host MUST be set if the 'node' protocol is in use! If this is set incorrectly Logstash will hang attempting to connect!"
|
309
309
|
end
|
310
310
|
|
311
|
-
client_settings = {}
|
312
|
-
client_settings["cluster.name"] = @cluster if @cluster
|
313
|
-
client_settings["network.host"] = @network_host if @network_host
|
314
|
-
client_settings["transport.tcp.port"] = @transport_tcp_port if @transport_tcp_port
|
315
|
-
client_settings["client.transport.sniff"] = @sniffing
|
316
|
-
|
317
|
-
if @node_name
|
318
|
-
client_settings["node.name"] = @node_name
|
319
|
-
else
|
320
|
-
client_settings["node.name"] = "logstash-#{Socket.gethostname}-#{$$}-#{object_id}"
|
321
|
-
end
|
322
|
-
|
323
|
-
@@plugins.each do |plugin|
|
324
|
-
name = plugin.name.split('-')[-1]
|
325
|
-
client_settings.merge!(LogStash::Outputs::ElasticSearchJava.const_get(name.capitalize).create_client_config(self))
|
326
|
-
end
|
327
|
-
|
328
311
|
if (@hosts.nil? || @hosts.empty?) && @protocol != "node" # node can use zen discovery
|
329
312
|
@logger.info("No 'hosts' set in elasticsearch output. Defaulting to localhost")
|
330
313
|
@hosts = ["localhost"]
|
331
314
|
end
|
332
315
|
|
333
|
-
common_options = {
|
334
|
-
:protocol => @protocol,
|
335
|
-
:client_settings => client_settings,
|
336
|
-
:hosts => @hosts,
|
337
|
-
:port => @port
|
338
|
-
}
|
339
|
-
|
340
|
-
# Update API setup
|
341
|
-
update_options = {
|
342
|
-
:upsert => @upsert,
|
343
|
-
:doc_as_upsert => @doc_as_upsert
|
344
|
-
}
|
345
|
-
common_options.merge! update_options if @action == 'update'
|
346
|
-
|
347
316
|
client_class = case @protocol
|
348
317
|
when "transport"
|
349
318
|
LogStash::Outputs::ElasticSearchJavaPlugins::Protocols::TransportClient
|
@@ -351,7 +320,7 @@ class LogStash::Outputs::ElasticSearchJava < LogStash::Outputs::Base
|
|
351
320
|
LogStash::Outputs::ElasticSearchJavaPlugins::Protocols::NodeClient
|
352
321
|
end
|
353
322
|
|
354
|
-
@client = client_class.new(
|
323
|
+
@client = client_class.new(client_options)
|
355
324
|
|
356
325
|
if @manage_template
|
357
326
|
begin
|
@@ -389,6 +358,41 @@ class LogStash::Outputs::ElasticSearchJava < LogStash::Outputs::Base
|
|
389
358
|
end
|
390
359
|
end # def register
|
391
360
|
|
361
|
+
def client_options
|
362
|
+
client_settings = {}
|
363
|
+
client_settings["cluster.name"] = @cluster if @cluster
|
364
|
+
client_settings["network.host"] = @network_host if @network_host
|
365
|
+
client_settings["transport.tcp.port"] = @transport_tcp_port if @transport_tcp_port
|
366
|
+
client_settings["client.transport.sniff"] = @sniffing
|
367
|
+
|
368
|
+
if @node_name
|
369
|
+
client_settings["node.name"] = @node_name
|
370
|
+
else
|
371
|
+
client_settings["node.name"] = "logstash-#{Socket.gethostname}-#{$$}-#{object_id}"
|
372
|
+
end
|
373
|
+
|
374
|
+
@@plugins.each do |plugin|
|
375
|
+
name = plugin.name.split('-')[-1]
|
376
|
+
client_settings.merge!(LogStash::Outputs::ElasticSearchJava.const_get(name.capitalize).create_client_config(self))
|
377
|
+
end
|
378
|
+
|
379
|
+
common_options = {
|
380
|
+
:protocol => @protocol,
|
381
|
+
:client_settings => client_settings,
|
382
|
+
:hosts => @hosts,
|
383
|
+
:port => @port
|
384
|
+
}
|
385
|
+
|
386
|
+
# Update API setup
|
387
|
+
update_options = {
|
388
|
+
:upsert => @upsert,
|
389
|
+
:doc_as_upsert => @doc_as_upsert
|
390
|
+
}
|
391
|
+
common_options.merge! update_options if @action == 'update'
|
392
|
+
|
393
|
+
common_options
|
394
|
+
end
|
395
|
+
|
392
396
|
|
393
397
|
public
|
394
398
|
def get_template
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-elasticsearch_java'
|
3
|
-
s.version = '2.0.0.
|
3
|
+
s.version = '2.0.0.beta8'
|
4
4
|
s.licenses = ['apache-2.0']
|
5
5
|
s.summary = "Logstash Output to Elasticsearch using Java node/transport client"
|
6
6
|
s.description = "Output events to elasticsearch using the java client"
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_runtime_dependency 'elasticsearch', ['>= 1.0.13', '~> 1.0']
|
24
24
|
s.add_runtime_dependency 'stud', ['>= 0.0.17', '~> 0.0']
|
25
25
|
s.add_runtime_dependency 'cabin', ['~> 0.6']
|
26
|
-
s.add_runtime_dependency "logstash-core",
|
26
|
+
s.add_runtime_dependency "logstash-core", "~> 2.0.0.snapshot"
|
27
27
|
|
28
28
|
s.add_development_dependency 'ftw', '~> 0.0.42'
|
29
29
|
s.add_development_dependency 'logstash-input-generator'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-elasticsearch_java
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.beta8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,23 +81,17 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- - "
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 2.0.0.beta1
|
87
|
-
- - "<"
|
84
|
+
- - "~>"
|
88
85
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
86
|
+
version: 2.0.0.snapshot
|
90
87
|
name: logstash-core
|
91
88
|
prerelease: false
|
92
89
|
type: :runtime
|
93
90
|
version_requirements: !ruby/object:Gem::Requirement
|
94
91
|
requirements:
|
95
|
-
- - "
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: 2.0.0.beta1
|
98
|
-
- - "<"
|
92
|
+
- - "~>"
|
99
93
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
94
|
+
version: 2.0.0.snapshot
|
101
95
|
- !ruby/object:Gem::Dependency
|
102
96
|
requirement: !ruby/object:Gem::Requirement
|
103
97
|
requirements:
|