logstash-output-elasticsearch 0.2.1-java → 0.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d98fbfd235190bb71d73b7cbb0264d837592b8b7
|
4
|
+
data.tar.gz: 9d5b21e767f3c0904f502b71d5555fa19e372351
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99c589027ad6f7299897351f15b70d6bb1108f8c07557d46928829952ed683bdf047efe5f90fb11c0596a7fcc04b335170b645a908da93f4cfaf1bd4ea43a489
|
7
|
+
data.tar.gz: e3af9110b3ec185ce7acfb5b67cb15d3df7bd554730ff33d8c323215b4d9aaf52482538e06b0b1717ec82bb4df69b92c1e3285052c50c24726ede0d1a4727bee
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'logstash/environment'
|
3
3
|
|
4
|
-
|
5
|
-
LogStash::Environment.load_runtime_jars! File.join(
|
4
|
+
root_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
5
|
+
LogStash::Environment.load_runtime_jars! File.join(root_dir, "vendor")
|
@@ -49,7 +49,13 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|
49
49
|
|
50
50
|
# The index type to write events to. Generally you should try to write only
|
51
51
|
# similar events to the same 'type'. String expansion `%{foo}` works here.
|
52
|
-
|
52
|
+
#
|
53
|
+
# Deprecated in favor of `document_type` field.
|
54
|
+
config :index_type, :validate => :string, :deprecated => true
|
55
|
+
|
56
|
+
# The document type to write events to. Generally you should try to write only
|
57
|
+
# similar events to the same 'type'. String expansion `%{foo}` works here.
|
58
|
+
config :document_type, :validate => :string
|
53
59
|
|
54
60
|
# Starting in Logstash 1.3 (unless you set option `manage_template` to false)
|
55
61
|
# a default mapping template for Elasticsearch will be applied, if you do not
|
@@ -96,7 +102,10 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|
96
102
|
# work in your environment.
|
97
103
|
#
|
98
104
|
# The plugin will use multicast discovery to connect to Elasticsearch
|
99
|
-
# when using `protocol => node` without setting a host.
|
105
|
+
# when using `protocol => node` without setting a host. When setting unicast
|
106
|
+
# hosts for `node` protocol, it is important to confirm that at least one non-client
|
107
|
+
# node is listed in the `:host` list. client nodes are filtered by default in zen-discovery.
|
108
|
+
# You need to set `discovery.zen.master_election.filter_client` to `false` to override this behavior.
|
100
109
|
#
|
101
110
|
# http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-discovery-zen.html#multicast[Multicast Discovery Docs]
|
102
111
|
#
|
@@ -248,6 +257,10 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|
248
257
|
@protocol = LogStash::Environment.jruby? ? "node" : "http"
|
249
258
|
end
|
250
259
|
|
260
|
+
if @protocol == "http" && @action == "create_unless_exists"
|
261
|
+
raise(LogStash::ConfigurationError, "action => 'create_unless_exists' is not supported under the HTTP protocol");
|
262
|
+
end
|
263
|
+
|
251
264
|
if ["node", "transport"].include?(@protocol)
|
252
265
|
# Node or TransportClient; requires JRuby
|
253
266
|
raise(LogStash::PluginLoadingError, "This configuration requires JRuby. If you are not using JRuby, you must set 'protocol' to 'http'. For example: output { elasticsearch { protocol => \"http\" } }") unless LogStash::Environment.jruby?
|
@@ -399,7 +412,13 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|
399
412
|
event['@metadata']['retry_count'] = 0
|
400
413
|
|
401
414
|
# Set the 'type' value for the index.
|
402
|
-
type =
|
415
|
+
type = if @document_type
|
416
|
+
event.sprintf(@document_type)
|
417
|
+
elsif @index_type # deprecated
|
418
|
+
event.sprintf(@index_type)
|
419
|
+
else
|
420
|
+
event["type"] || "logs"
|
421
|
+
end
|
403
422
|
|
404
423
|
index = event.sprintf(@index)
|
405
424
|
|
@@ -6,11 +6,20 @@ require "stud/try"
|
|
6
6
|
|
7
7
|
describe "outputs/elasticsearch" do
|
8
8
|
|
9
|
-
|
10
|
-
output = LogStash::Plugin.lookup("output", "elasticsearch").new("embedded" => "false", "protocol" => "transport", "manage_template" => "false")
|
9
|
+
context "registration" do
|
11
10
|
|
12
|
-
|
13
|
-
|
11
|
+
it "should register" do
|
12
|
+
output = LogStash::Plugin.lookup("output", "elasticsearch").new("embedded" => "false", "protocol" => "transport", "manage_template" => "false")
|
13
|
+
|
14
|
+
# register will try to load jars and raise if it cannot find jars
|
15
|
+
expect {output.register}.to_not raise_error
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should fail to register when protocol => http, action => create_unless_exists" do
|
19
|
+
output = LogStash::Plugin.lookup("output", "elasticsearch").new("protocol" => "http", "action" => "create_unless_exists")
|
20
|
+
|
21
|
+
expect {output.register}.to raise_error
|
22
|
+
end
|
14
23
|
end
|
15
24
|
|
16
25
|
describe "ship lots of events w/ default index_type", :elasticsearch => true do
|
metadata
CHANGED
@@ -1,39 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elasticsearch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-16 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
24
|
- - '>='
|
32
25
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
|
35
|
-
- !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
|
- - '>='
|
@@ -42,18 +33,18 @@ dependencies:
|
|
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:
|
43
|
+
version: 1.0.6
|
54
44
|
- - ~>
|
55
45
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
46
|
+
version: '1.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
57
48
|
requirement: !ruby/object:Gem::Requirement
|
58
49
|
requirements:
|
59
50
|
- - '>='
|
@@ -62,32 +53,32 @@ dependencies:
|
|
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:
|
61
|
+
- - '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 0.0.17
|
71
64
|
- - ~>
|
72
65
|
- !ruby/object:Gem::Version
|
73
|
-
version: '0.
|
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:
|
80
|
+
version: '0.6'
|
81
|
+
- !ruby/object:Gem::Dependency
|
91
82
|
requirement: !ruby/object:Gem::Requirement
|
92
83
|
requirements:
|
93
84
|
- - '>='
|
@@ -96,64 +87,73 @@ dependencies:
|
|
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:
|
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:
|
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
|
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.3'
|
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.3'
|
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
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - '>='
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
157
|
description: Output events to elasticsearch
|
158
158
|
email: info@elasticsearch.com
|
159
159
|
executables: []
|