logstash-output-elasticsearch 1.0.1-java → 1.0.2-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: 0373b6049087752b171319e0676b8f39c74a985f
4
- data.tar.gz: e7354caf71f405678eabede5040c444bfac29c7d
3
+ metadata.gz: 606597e1ab355ae55f2e3a001d8b49d129c56c92
4
+ data.tar.gz: 93eefd3c03a06af5d37bc32bc5afa3b7636bacb8
5
5
  SHA512:
6
- metadata.gz: 9308c2ef370c543edc5f8f82b68e1b51b815c2b5c71e1f59e899176dde28280fc05a9f3d182f689fbbd4034d01e9e5baec35cf071b59ed851d8d62dd679b42fe
7
- data.tar.gz: c9eafd9683a6e28569cdf46af87e094ac601229483946fbd0d06268a0cf79931539737786fc7538985abe426524ae9f023fc92020069915d3da3115e9c3b37eb
6
+ metadata.gz: 4195eed5510df975b105a7b4d7ae7de0e2be1dd2b5f1a1a14e5ed6587ce5c8ccd20b2b50596d7cb525e9c8446c898859ae6c13646d1e58a960ad34383ef621f1
7
+ data.tar.gz: 49320ab0592c7a6ca9906cfd3de38cdd8b74bc8620ca90e9fb136d7bf1ff807a4bf65a2c02b9e39825f572540971e6d908607dc8a1f9fce59278136727129d2e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.0.2
2
+ - Upgrade Manticore HTTP Client
3
+
4
+ ## 1.0.1
5
+ - Allow client certificates
6
+
1
7
  ## 0.2.9
2
8
  - Add 'path' parameter for ES HTTP hosts behind a proxy on a subpath
3
9
 
@@ -289,6 +289,13 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
289
289
  # Set the truststore password
290
290
  config :truststore_password, :validate => :password
291
291
 
292
+ # The keystore used to present a certificate to the server
293
+ # It can be either .jks or .p12
294
+ config :keystore, :validate => :path
295
+
296
+ # Set the truststore password
297
+ config :keystore_password, :validate => :password
298
+
292
299
  # Enable cluster sniffing (transport only)
293
300
  # Asks host for the list of all cluster nodes and adds them to the hosts list
294
301
  config :sniffing, :validate => :boolean, :default => false
@@ -603,6 +610,10 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
603
610
  ssl_options[:truststore_password] = @truststore_password.value if @truststore_password
604
611
  end
605
612
  ssl_options[:truststore] = @truststore if @truststore
613
+ if @keystore
614
+ ssl_options[:keystore] = @keystore
615
+ ssl_options[:keystore_password] = @keystore_password.value if @keystore_password
616
+ end
606
617
  if @ssl_certificate_verification == false
607
618
  @logger.warn [
608
619
  "** WARNING ** Detected UNSAFE options in elasticsearch output configuration!",
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-elasticsearch'
4
- s.version = '1.0.1'
4
+ s.version = '1.0.2'
5
5
  s.licenses = ['apache-2.0']
6
6
  s.summary = "Logstash Output to Elasticsearch"
7
7
  s.description = "Output events to elasticsearch"
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
 
33
33
  if RUBY_PLATFORM == 'java'
34
34
  s.platform = RUBY_PLATFORM
35
- s.add_runtime_dependency "manticore", '~> 0.3'
35
+ s.add_runtime_dependency "manticore", '~> 0.4.2'
36
36
  end
37
37
 
38
38
  s.add_development_dependency 'logstash-devutils'
@@ -84,8 +84,8 @@ describe "index template expected behavior", :integration => true do
84
84
  end
85
85
 
86
86
  it "should index stopwords like 'at' " do
87
- results = @es.search(:body => { "facets" => { "t" => { "terms" => { "field" => "country" } } } })["facets"]["t"]
88
- terms = results["terms"].collect { |t| t["term"] }
87
+ results = @es.search(:body => { "aggregations" => { "my_agg" => { "terms" => { "field" => "country" } } } })["aggregations"]["my_agg"]
88
+ terms = results["buckets"].collect { |b| b["key"] }
89
89
 
90
90
  insist { terms }.include?("us")
91
91
 
@@ -1,4 +1,5 @@
1
1
  require_relative "../../../spec/es_spec_helper"
2
+ require 'stud/temporary'
2
3
 
3
4
  describe "SSL option" do
4
5
  ["node", "transport"].each do |protocol|
@@ -47,5 +48,35 @@ describe "SSL option" do
47
48
  subject.register
48
49
  end
49
50
  end
51
+
52
+ context "when using ssl with client certificates" do
53
+
54
+ let(:keystore_path) { Stud::Temporary.file.path }
55
+
56
+ after :each do
57
+ File.delete(keystore_path)
58
+ end
59
+
60
+ subject do
61
+ require "logstash/outputs/elasticsearch"
62
+ settings = {
63
+ "protocol" => protocol,
64
+ "host" => "node01",
65
+ "ssl" => true,
66
+ "keystore" => keystore_path,
67
+ "keystore_password" => "test"
68
+ }
69
+ next LogStash::Outputs::ElasticSearch.new(settings)
70
+ end
71
+
72
+
73
+ it "should pass the keystore parameters to the ES client" do
74
+ expect(::Elasticsearch::Client).to receive(:new) do |args|
75
+ expect(args[:ssl]).to include(:keystore => keystore_path, :keystore_password => "test")
76
+ end
77
+ subject.register
78
+ end
79
+
80
+ end
50
81
  end
51
82
  end
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: 1.0.1
4
+ version: 1.0.2
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-30 00:00:00.000000000 Z
11
+ date: 2015-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -132,12 +132,12 @@ dependencies:
132
132
  requirements:
133
133
  - - ~>
134
134
  - !ruby/object:Gem::Version
135
- version: '0.3'
135
+ version: 0.4.2
136
136
  requirement: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ~>
139
139
  - !ruby/object:Gem::Version
140
- version: '0.3'
140
+ version: 0.4.2
141
141
  prerelease: false
142
142
  type: :runtime
143
143
  - !ruby/object:Gem::Dependency