logstash-output-elasticsearch 1.1.0-java → 2.0.0.beta4-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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +10 -3
  4. data/README.md +4 -4
  5. data/lib/logstash/outputs/elasticsearch/http_client.rb +144 -0
  6. data/lib/logstash/outputs/elasticsearch.rb +93 -319
  7. data/logstash-output-elasticsearch.gemspec +1 -3
  8. data/spec/es_spec_helper.rb +38 -34
  9. data/spec/integration/outputs/create_spec.rb +56 -0
  10. data/spec/integration/outputs/index_spec.rb +5 -7
  11. data/spec/integration/outputs/retry_spec.rb +118 -126
  12. data/spec/integration/outputs/routing_spec.rb +5 -33
  13. data/spec/integration/outputs/secure_spec.rb +4 -9
  14. data/spec/integration/outputs/templates_spec.rb +85 -91
  15. data/spec/integration/outputs/update_spec.rb +41 -46
  16. data/spec/unit/outputs/elasticsearch/protocol_spec.rb +45 -36
  17. data/spec/unit/outputs/elasticsearch_proxy_spec.rb +3 -4
  18. data/spec/unit/outputs/elasticsearch_spec.rb +2 -151
  19. data/spec/unit/outputs/elasticsearch_ssl_spec.rb +38 -63
  20. metadata +67 -101
  21. data/lib/logstash/outputs/elasticsearch/protocol.rb +0 -333
  22. data/lib/logstash-output-elasticsearch_jars.rb +0 -5
  23. data/spec/integration/outputs/elasticsearch/node_spec.rb +0 -36
  24. data/spec/integration/outputs/transport_create_spec.rb +0 -94
  25. data/vendor/jar-dependencies/runtime-jars/antlr-runtime-3.5.jar +0 -0
  26. data/vendor/jar-dependencies/runtime-jars/asm-4.1.jar +0 -0
  27. data/vendor/jar-dependencies/runtime-jars/asm-commons-4.1.jar +0 -0
  28. data/vendor/jar-dependencies/runtime-jars/elasticsearch-1.7.0.jar +0 -0
  29. data/vendor/jar-dependencies/runtime-jars/lucene-analyzers-common-4.10.4.jar +0 -0
  30. data/vendor/jar-dependencies/runtime-jars/lucene-core-4.10.4.jar +0 -0
  31. data/vendor/jar-dependencies/runtime-jars/lucene-grouping-4.10.4.jar +0 -0
  32. data/vendor/jar-dependencies/runtime-jars/lucene-highlighter-4.10.4.jar +0 -0
  33. data/vendor/jar-dependencies/runtime-jars/lucene-join-4.10.4.jar +0 -0
  34. data/vendor/jar-dependencies/runtime-jars/lucene-memory-4.10.4.jar +0 -0
  35. data/vendor/jar-dependencies/runtime-jars/lucene-misc-4.10.4.jar +0 -0
  36. data/vendor/jar-dependencies/runtime-jars/lucene-queries-4.10.4.jar +0 -0
  37. data/vendor/jar-dependencies/runtime-jars/lucene-queryparser-4.10.4.jar +0 -0
  38. data/vendor/jar-dependencies/runtime-jars/lucene-sandbox-4.10.4.jar +0 -0
  39. data/vendor/jar-dependencies/runtime-jars/lucene-spatial-4.10.4.jar +0 -0
  40. data/vendor/jar-dependencies/runtime-jars/lucene-suggest-4.10.4.jar +0 -0
  41. data/vendor/jar-dependencies/runtime-jars/spatial4j-0.4.1.jar +0 -0
@@ -2,81 +2,56 @@ require_relative "../../../spec/es_spec_helper"
2
2
  require 'stud/temporary'
3
3
 
4
4
  describe "SSL option" do
5
- ["node", "transport"].each do |protocol|
6
- context "with protocol => #{protocol}" do
7
- subject do
8
- require "logstash/outputs/elasticsearch"
9
- settings = {
10
- "protocol" => protocol,
11
- "node_name" => "logstash",
12
- "cluster" => "elasticsearch",
13
- "host" => "node01",
14
- "ssl" => true
15
- }
16
- next LogStash::Outputs::ElasticSearch.new(settings)
17
- end
18
-
19
- it "should fail in register" do
20
- expect {subject.register}.to raise_error
21
- end
5
+ context "when using ssl without cert verification" do
6
+ subject do
7
+ require "logstash/outputs/elasticsearch"
8
+ settings = {
9
+ "hosts" => "node01",
10
+ "ssl" => true,
11
+ "ssl_certificate_verification" => false
12
+ }
13
+ next LogStash::Outputs::ElasticSearch.new(settings)
22
14
  end
23
- end
24
15
 
25
- context "when using http protocol" do
26
- protocol = "http"
27
- context "when using ssl without cert verification" do
28
- subject do
29
- require "logstash/outputs/elasticsearch"
30
- settings = {
31
- "protocol" => protocol,
32
- "host" => "node01",
33
- "ssl" => true,
34
- "ssl_certificate_verification" => false
35
- }
36
- next LogStash::Outputs::ElasticSearch.new(settings)
37
- end
38
-
39
- it "should pass the flag to the ES client" do
40
- expect(::Elasticsearch::Client).to receive(:new) do |args|
41
- expect(args[:ssl]).to eq(:verify => false)
42
- end
43
- subject.register
16
+ it "should pass the flag to the ES client" do
17
+ expect(::Elasticsearch::Client).to receive(:new) do |args|
18
+ expect(args[:ssl]).to eq(:verify => false)
44
19
  end
20
+ subject.register
21
+ end
45
22
 
46
- it "print a warning" do
47
- expect(subject.logger).to receive(:warn)
48
- subject.register
49
- end
23
+ it "print a warning" do
24
+ expect(subject.logger).to receive(:warn)
25
+ subject.register
50
26
  end
27
+ end
51
28
 
52
- context "when using ssl with client certificates" do
29
+ context "when using ssl with client certificates" do
53
30
 
54
- let(:keystore_path) { Stud::Temporary.file.path }
31
+ let(:keystore_path) { Stud::Temporary.file.path }
55
32
 
56
- after :each do
57
- File.delete(keystore_path)
58
- end
33
+ after :each do
34
+ File.delete(keystore_path)
35
+ end
59
36
 
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
37
+ subject do
38
+ require "logstash/outputs/elasticsearch"
39
+ settings = {
40
+ "hosts" => "node01",
41
+ "ssl" => true,
42
+ "keystore" => keystore_path,
43
+ "keystore_password" => "test"
44
+ }
45
+ next LogStash::Outputs::ElasticSearch.new(settings)
46
+ end
71
47
 
72
48
 
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
49
+ it "should pass the keystore parameters to the ES client" do
50
+ expect(::Elasticsearch::Client).to receive(:new) do |args|
51
+ expect(args[:ssl]).to include(:keystore => keystore_path, :keystore_password => "test")
78
52
  end
79
-
53
+ subject.register
80
54
  end
55
+
81
56
  end
82
57
  end
metadata CHANGED
@@ -1,194 +1,180 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2.0.0.beta4
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-09 00:00:00.000000000 Z
11
+ date: 2015-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: concurrent-ruby
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
14
  requirement: !ruby/object:Gem::Requirement
21
15
  requirements:
22
- - - '>='
16
+ - - ">="
23
17
  - !ruby/object:Gem::Version
24
18
  version: '0'
19
+ name: concurrent-ruby
25
20
  prerelease: false
26
21
  type: :runtime
27
- - !ruby/object:Gem::Dependency
28
- name: elasticsearch
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: 1.0.10
34
- - - ~>
24
+ - - ">="
35
25
  - !ruby/object:Gem::Version
36
- version: '1.0'
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
37
28
  requirement: !ruby/object:Gem::Requirement
38
29
  requirements:
39
- - - '>='
30
+ - - ">="
40
31
  - !ruby/object:Gem::Version
41
32
  version: 1.0.10
42
- - - ~>
33
+ - - "~>"
43
34
  - !ruby/object:Gem::Version
44
35
  version: '1.0'
36
+ name: elasticsearch
45
37
  prerelease: false
46
38
  type: :runtime
47
- - !ruby/object:Gem::Dependency
48
- name: stud
49
39
  version_requirements: !ruby/object:Gem::Requirement
50
40
  requirements:
51
- - - '>='
41
+ - - ">="
52
42
  - !ruby/object:Gem::Version
53
- version: 0.0.17
54
- - - ~>
43
+ version: 1.0.10
44
+ - - "~>"
55
45
  - !ruby/object:Gem::Version
56
- version: '0.0'
46
+ version: '1.0'
47
+ - !ruby/object:Gem::Dependency
57
48
  requirement: !ruby/object:Gem::Requirement
58
49
  requirements:
59
- - - '>='
50
+ - - ">="
60
51
  - !ruby/object:Gem::Version
61
52
  version: 0.0.17
62
- - - ~>
53
+ - - "~>"
63
54
  - !ruby/object:Gem::Version
64
55
  version: '0.0'
56
+ name: stud
65
57
  prerelease: false
66
58
  type: :runtime
67
- - !ruby/object:Gem::Dependency
68
- name: cabin
69
59
  version_requirements: !ruby/object:Gem::Requirement
70
60
  requirements:
71
- - - ~>
61
+ - - ">="
72
62
  - !ruby/object:Gem::Version
73
- version: '0.6'
63
+ version: 0.0.17
64
+ - - "~>"
65
+ - !ruby/object:Gem::Version
66
+ version: '0.0'
67
+ - !ruby/object:Gem::Dependency
74
68
  requirement: !ruby/object:Gem::Requirement
75
69
  requirements:
76
- - - ~>
70
+ - - "~>"
77
71
  - !ruby/object:Gem::Version
78
72
  version: '0.6'
73
+ name: cabin
79
74
  prerelease: false
80
75
  type: :runtime
81
- - !ruby/object:Gem::Dependency
82
- name: logstash-core
83
76
  version_requirements: !ruby/object:Gem::Requirement
84
77
  requirements:
85
- - - '>='
86
- - !ruby/object:Gem::Version
87
- version: 1.4.0
88
- - - <
78
+ - - "~>"
89
79
  - !ruby/object:Gem::Version
90
- version: 2.0.0
80
+ version: '0.6'
81
+ - !ruby/object:Gem::Dependency
91
82
  requirement: !ruby/object:Gem::Requirement
92
83
  requirements:
93
- - - '>='
84
+ - - ">="
94
85
  - !ruby/object:Gem::Version
95
86
  version: 1.4.0
96
- - - <
87
+ - - "<"
97
88
  - !ruby/object:Gem::Version
98
89
  version: 2.0.0
90
+ name: logstash-core
99
91
  prerelease: false
100
92
  type: :runtime
101
- - !ruby/object:Gem::Dependency
102
- name: ftw
103
93
  version_requirements: !ruby/object:Gem::Requirement
104
94
  requirements:
105
- - - ~>
95
+ - - ">="
106
96
  - !ruby/object:Gem::Version
107
- version: 0.0.42
97
+ version: 1.4.0
98
+ - - "<"
99
+ - !ruby/object:Gem::Version
100
+ version: 2.0.0
101
+ - !ruby/object:Gem::Dependency
108
102
  requirement: !ruby/object:Gem::Requirement
109
103
  requirements:
110
- - - ~>
104
+ - - "~>"
111
105
  - !ruby/object:Gem::Version
112
106
  version: 0.0.42
107
+ name: ftw
113
108
  prerelease: false
114
109
  type: :development
115
- - !ruby/object:Gem::Dependency
116
- name: logstash-input-generator
117
110
  version_requirements: !ruby/object:Gem::Requirement
118
111
  requirements:
119
- - - '>='
112
+ - - "~>"
120
113
  - !ruby/object:Gem::Version
121
- version: '0'
114
+ version: 0.0.42
115
+ - !ruby/object:Gem::Dependency
122
116
  requirement: !ruby/object:Gem::Requirement
123
117
  requirements:
124
- - - '>='
118
+ - - ">="
125
119
  - !ruby/object:Gem::Version
126
120
  version: '0'
121
+ name: logstash-input-generator
127
122
  prerelease: false
128
123
  type: :development
129
- - !ruby/object:Gem::Dependency
130
- name: manticore
131
124
  version_requirements: !ruby/object:Gem::Requirement
132
125
  requirements:
133
- - - ~>
126
+ - - ">="
134
127
  - !ruby/object:Gem::Version
135
- version: 0.4.2
128
+ version: '0'
129
+ - !ruby/object:Gem::Dependency
136
130
  requirement: !ruby/object:Gem::Requirement
137
131
  requirements:
138
- - - ~>
132
+ - - "~>"
139
133
  - !ruby/object:Gem::Version
140
134
  version: 0.4.2
135
+ name: manticore
141
136
  prerelease: false
142
137
  type: :runtime
143
- - !ruby/object:Gem::Dependency
144
- name: logstash-devutils
145
138
  version_requirements: !ruby/object:Gem::Requirement
146
139
  requirements:
147
- - - '>='
140
+ - - "~>"
148
141
  - !ruby/object:Gem::Version
149
- version: '0'
142
+ version: 0.4.2
143
+ - !ruby/object:Gem::Dependency
150
144
  requirement: !ruby/object:Gem::Requirement
151
145
  requirements:
152
- - - '>='
146
+ - - ">="
153
147
  - !ruby/object:Gem::Version
154
148
  version: '0'
149
+ name: logstash-devutils
155
150
  prerelease: false
156
151
  type: :development
157
- - !ruby/object:Gem::Dependency
158
- name: longshoreman
159
152
  version_requirements: !ruby/object:Gem::Requirement
160
153
  requirements:
161
- - - '>='
154
+ - - ">="
162
155
  - !ruby/object:Gem::Version
163
156
  version: '0'
157
+ - !ruby/object:Gem::Dependency
164
158
  requirement: !ruby/object:Gem::Requirement
165
159
  requirements:
166
- - - '>='
160
+ - - ">="
167
161
  - !ruby/object:Gem::Version
168
162
  version: '0'
163
+ name: longshoreman
169
164
  prerelease: false
170
165
  type: :development
171
- - !ruby/object:Gem::Dependency
172
- name: flores
173
166
  version_requirements: !ruby/object:Gem::Requirement
174
167
  requirements:
175
- - - '>='
168
+ - - ">="
176
169
  - !ruby/object:Gem::Version
177
170
  version: '0'
178
- requirement: !ruby/object:Gem::Requirement
179
- requirements:
180
- - - '>='
181
- - !ruby/object:Gem::Version
182
- version: '0'
183
- prerelease: false
184
- type: :development
185
171
  description: Output events to elasticsearch
186
172
  email: info@elastic.co
187
173
  executables: []
188
174
  extensions: []
189
175
  extra_rdoc_files: []
190
176
  files:
191
- - .gitignore
177
+ - ".gitignore"
192
178
  - CHANGELOG.md
193
179
  - CONTRIBUTORS
194
180
  - Gemfile
@@ -196,41 +182,22 @@ files:
196
182
  - NOTICE.TXT
197
183
  - README.md
198
184
  - Rakefile
199
- - lib/logstash-output-elasticsearch_jars.rb
200
185
  - lib/logstash/outputs/elasticsearch.rb
201
186
  - lib/logstash/outputs/elasticsearch/elasticsearch-template.json
202
- - lib/logstash/outputs/elasticsearch/protocol.rb
187
+ - lib/logstash/outputs/elasticsearch/http_client.rb
203
188
  - logstash-output-elasticsearch.gemspec
204
189
  - spec/es_spec_helper.rb
205
- - spec/integration/outputs/elasticsearch/node_spec.rb
190
+ - spec/integration/outputs/create_spec.rb
206
191
  - spec/integration/outputs/index_spec.rb
207
192
  - spec/integration/outputs/retry_spec.rb
208
193
  - spec/integration/outputs/routing_spec.rb
209
194
  - spec/integration/outputs/secure_spec.rb
210
195
  - spec/integration/outputs/templates_spec.rb
211
- - spec/integration/outputs/transport_create_spec.rb
212
196
  - spec/integration/outputs/update_spec.rb
213
197
  - spec/unit/outputs/elasticsearch/protocol_spec.rb
214
198
  - spec/unit/outputs/elasticsearch_proxy_spec.rb
215
199
  - spec/unit/outputs/elasticsearch_spec.rb
216
200
  - spec/unit/outputs/elasticsearch_ssl_spec.rb
217
- - vendor/jar-dependencies/runtime-jars/antlr-runtime-3.5.jar
218
- - vendor/jar-dependencies/runtime-jars/asm-4.1.jar
219
- - vendor/jar-dependencies/runtime-jars/asm-commons-4.1.jar
220
- - vendor/jar-dependencies/runtime-jars/elasticsearch-1.7.0.jar
221
- - vendor/jar-dependencies/runtime-jars/lucene-analyzers-common-4.10.4.jar
222
- - vendor/jar-dependencies/runtime-jars/lucene-core-4.10.4.jar
223
- - vendor/jar-dependencies/runtime-jars/lucene-grouping-4.10.4.jar
224
- - vendor/jar-dependencies/runtime-jars/lucene-highlighter-4.10.4.jar
225
- - vendor/jar-dependencies/runtime-jars/lucene-join-4.10.4.jar
226
- - vendor/jar-dependencies/runtime-jars/lucene-memory-4.10.4.jar
227
- - vendor/jar-dependencies/runtime-jars/lucene-misc-4.10.4.jar
228
- - vendor/jar-dependencies/runtime-jars/lucene-queries-4.10.4.jar
229
- - vendor/jar-dependencies/runtime-jars/lucene-queryparser-4.10.4.jar
230
- - vendor/jar-dependencies/runtime-jars/lucene-sandbox-4.10.4.jar
231
- - vendor/jar-dependencies/runtime-jars/lucene-spatial-4.10.4.jar
232
- - vendor/jar-dependencies/runtime-jars/lucene-suggest-4.10.4.jar
233
- - vendor/jar-dependencies/runtime-jars/spatial4j-0.4.1.jar
234
201
  homepage: http://logstash.net/
235
202
  licenses:
236
203
  - apache-2.0
@@ -243,14 +210,14 @@ require_paths:
243
210
  - lib
244
211
  required_ruby_version: !ruby/object:Gem::Requirement
245
212
  requirements:
246
- - - '>='
213
+ - - ">="
247
214
  - !ruby/object:Gem::Version
248
215
  version: '0'
249
216
  required_rubygems_version: !ruby/object:Gem::Requirement
250
217
  requirements:
251
- - - '>='
218
+ - - ">"
252
219
  - !ruby/object:Gem::Version
253
- version: '0'
220
+ version: 1.3.1
254
221
  requirements: []
255
222
  rubyforge_project:
256
223
  rubygems_version: 2.4.8
@@ -259,13 +226,12 @@ specification_version: 4
259
226
  summary: Logstash Output to Elasticsearch
260
227
  test_files:
261
228
  - spec/es_spec_helper.rb
262
- - spec/integration/outputs/elasticsearch/node_spec.rb
229
+ - spec/integration/outputs/create_spec.rb
263
230
  - spec/integration/outputs/index_spec.rb
264
231
  - spec/integration/outputs/retry_spec.rb
265
232
  - spec/integration/outputs/routing_spec.rb
266
233
  - spec/integration/outputs/secure_spec.rb
267
234
  - spec/integration/outputs/templates_spec.rb
268
- - spec/integration/outputs/transport_create_spec.rb
269
235
  - spec/integration/outputs/update_spec.rb
270
236
  - spec/unit/outputs/elasticsearch/protocol_spec.rb
271
237
  - spec/unit/outputs/elasticsearch_proxy_spec.rb