logstash-output-zeromq 3.0.0 → 3.1.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/Gemfile +8 -1
- data/docs/index.asciidoc +126 -0
- data/lib/logstash/outputs/zeromq.rb +5 -8
- data/logstash-output-zeromq.gemspec +3 -3
- metadata +27 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0af4e021e815bcd538e429f4e3a1303fc44cdf65
|
4
|
+
data.tar.gz: 76dc8de9af44b8a9a64aa95f8ff6f7377e9ceee5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52843e2bc85884e0c0e1d650d34903b82feca64c7cda8d5cedeb845265586fe673b1b65f9a42337162f9e63fb7078da2b0bc9176c75773353c65c80a26bb182b
|
7
|
+
data.tar.gz: 915ab9e6fb050149edbd6de5fe20d65df469c0b18449a5238350a04b9cf91289b5498b1090bb3642e041c0845813663f01fe6a65f17b57124ab12375eb9807e8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## 3.1.0
|
2
|
+
- Move to concurrency :single for safety. This may cause some slowdown in
|
3
|
+
client mode, but is the easiest upgrade path. Moving to :shared would be nice
|
4
|
+
at some point.
|
5
|
+
|
6
|
+
## 3.0.2
|
7
|
+
- Relax constraint on logstash-core-plugin-api to >= 1.60 <= 2.99
|
8
|
+
|
9
|
+
## 3.0.1
|
10
|
+
- Republish all the gems under jruby.
|
1
11
|
## 3.0.0
|
2
12
|
- Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141
|
3
13
|
# 2.1.0
|
data/Gemfile
CHANGED
@@ -1,4 +1,11 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
# Specify your gem's dependencies in logstash-mass_effect.gemspec
|
4
3
|
gemspec
|
4
|
+
|
5
|
+
logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
|
6
|
+
use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
|
7
|
+
|
8
|
+
if Dir.exist?(logstash_path) && use_logstash_source
|
9
|
+
gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
|
10
|
+
gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
|
11
|
+
end
|
data/docs/index.asciidoc
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
:plugin: zeromq
|
2
|
+
:type: output
|
3
|
+
|
4
|
+
///////////////////////////////////////////
|
5
|
+
START - GENERATED VARIABLES, DO NOT EDIT!
|
6
|
+
///////////////////////////////////////////
|
7
|
+
:version: %VERSION%
|
8
|
+
:release_date: %RELEASE_DATE%
|
9
|
+
:changelog_url: %CHANGELOG_URL%
|
10
|
+
:include_path: ../../../../logstash/docs/include
|
11
|
+
///////////////////////////////////////////
|
12
|
+
END - GENERATED VARIABLES, DO NOT EDIT!
|
13
|
+
///////////////////////////////////////////
|
14
|
+
|
15
|
+
[id="plugins-{type}-{plugin}"]
|
16
|
+
|
17
|
+
=== Zeromq output plugin
|
18
|
+
|
19
|
+
include::{include_path}/plugin_header.asciidoc[]
|
20
|
+
|
21
|
+
==== Description
|
22
|
+
|
23
|
+
Write events to a 0MQ PUB socket.
|
24
|
+
|
25
|
+
You need to have the 0mq 2.1.x library installed to be able to use
|
26
|
+
this output plugin.
|
27
|
+
|
28
|
+
The default settings will create a publisher connecting to a subscriber
|
29
|
+
bound to tcp://127.0.0.1:2120
|
30
|
+
|
31
|
+
|
32
|
+
[id="plugins-{type}s-{plugin}-options"]
|
33
|
+
==== Zeromq Output Configuration Options
|
34
|
+
|
35
|
+
This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
|
36
|
+
|
37
|
+
[cols="<,<,<",options="header",]
|
38
|
+
|=======================================================================
|
39
|
+
|Setting |Input type|Required
|
40
|
+
| <<plugins-{type}s-{plugin}-address>> |<<array,array>>|No
|
41
|
+
| <<plugins-{type}s-{plugin}-mode>> |<<string,string>>, one of `["server", "client"]`|No
|
42
|
+
| <<plugins-{type}s-{plugin}-sockopt>> |<<hash,hash>>|No
|
43
|
+
| <<plugins-{type}s-{plugin}-topic>> |<<string,string>>|No
|
44
|
+
| <<plugins-{type}s-{plugin}-topology>> |<<string,string>>, one of `["pushpull", "pubsub", "pair"]`|Yes
|
45
|
+
|=======================================================================
|
46
|
+
|
47
|
+
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
48
|
+
output plugins.
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
[id="plugins-{type}s-{plugin}-address"]
|
53
|
+
===== `address`
|
54
|
+
|
55
|
+
* Value type is <<array,array>>
|
56
|
+
* Default value is `["tcp://127.0.0.1:2120"]`
|
57
|
+
|
58
|
+
This will be a performance bottleneck. Someone needs to upgrade this to
|
59
|
+
concurrency :shared and make sure there is no breakage
|
60
|
+
0mq socket address to connect or bind.
|
61
|
+
Please note that `inproc://` will not work with logstashi.
|
62
|
+
For each we use a context per thread.
|
63
|
+
By default, inputs bind/listen and outputs connect.
|
64
|
+
|
65
|
+
[id="plugins-{type}s-{plugin}-mode"]
|
66
|
+
===== `mode`
|
67
|
+
|
68
|
+
* Value can be any of: `server`, `client`
|
69
|
+
* Default value is `"client"`
|
70
|
+
|
71
|
+
Server mode binds/listens. Client mode connects.
|
72
|
+
|
73
|
+
[id="plugins-{type}s-{plugin}-sockopt"]
|
74
|
+
===== `sockopt`
|
75
|
+
|
76
|
+
* Value type is <<hash,hash>>
|
77
|
+
* There is no default value for this setting.
|
78
|
+
|
79
|
+
This exposes zmq_setsockopt for advanced tuning.
|
80
|
+
See http://api.zeromq.org/2-1:zmq-setsockopt for details.
|
81
|
+
|
82
|
+
This is where you would set values like:
|
83
|
+
|
84
|
+
* ZMQ::HWM - high water mark
|
85
|
+
* ZMQ::IDENTITY - named queues
|
86
|
+
* ZMQ::SWAP_SIZE - space for disk overflow
|
87
|
+
|
88
|
+
Example:
|
89
|
+
[source,ruby]
|
90
|
+
sockopt => {
|
91
|
+
"ZMQ::HWM" => 50
|
92
|
+
"ZMQ::IDENTITY" => "my_named_queue"
|
93
|
+
}
|
94
|
+
|
95
|
+
[id="plugins-{type}s-{plugin}-topic"]
|
96
|
+
===== `topic`
|
97
|
+
|
98
|
+
* Value type is <<string,string>>
|
99
|
+
* Default value is `""`
|
100
|
+
|
101
|
+
This is used for the 'pubsub' topology only.
|
102
|
+
On inputs, this allows you to filter messages by topic.
|
103
|
+
On outputs, this allows you to tag a message for routing.
|
104
|
+
NOTE: ZeroMQ does subscriber-side filtering
|
105
|
+
NOTE: Topic is evaluated with `event.sprintf` so macros are valid here.
|
106
|
+
|
107
|
+
[id="plugins-{type}s-{plugin}-topology"]
|
108
|
+
===== `topology`
|
109
|
+
|
110
|
+
* This is a required setting.
|
111
|
+
* Value can be any of: `pushpull`, `pubsub`, `pair`
|
112
|
+
* There is no default value for this setting.
|
113
|
+
|
114
|
+
The default logstash topologies work as follows:
|
115
|
+
|
116
|
+
* pushpull - inputs are pull, outputs are push
|
117
|
+
* pubsub - inputs are subscribers, outputs are publishers
|
118
|
+
* pair - inputs are clients, outputs are servers
|
119
|
+
|
120
|
+
If the predefined topology flows don't work for you,
|
121
|
+
you can change the 'mode' setting
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
[id="plugins-{type}s-{plugin}-common-options"]
|
126
|
+
include::{include_path}/{type}.asciidoc[]
|
@@ -11,6 +11,9 @@ require "logstash/namespace"
|
|
11
11
|
# bound to tcp://127.0.0.1:2120
|
12
12
|
#
|
13
13
|
class LogStash::Outputs::ZeroMQ < LogStash::Outputs::Base
|
14
|
+
# This will be a performance bottleneck. Someone needs to upgrade this to
|
15
|
+
# concurrency :shared and make sure there is no breakage
|
16
|
+
concurrency :single
|
14
17
|
|
15
18
|
config_name "zeromq"
|
16
19
|
|
@@ -63,13 +66,7 @@ class LogStash::Outputs::ZeroMQ < LogStash::Outputs::Base
|
|
63
66
|
def register
|
64
67
|
load_zmq
|
65
68
|
|
66
|
-
if @mode == "server"
|
67
|
-
workers_not_supported("With 'mode => server', only one zeromq socket may bind to a port and may not be shared among threads. Going to single-worker mode for this plugin!")
|
68
|
-
end
|
69
|
-
|
70
69
|
connect
|
71
|
-
|
72
|
-
@codec.on_event(&method(:publish))
|
73
70
|
end # def register
|
74
71
|
|
75
72
|
public
|
@@ -81,8 +78,8 @@ class LogStash::Outputs::ZeroMQ < LogStash::Outputs::Base
|
|
81
78
|
end
|
82
79
|
end # def close
|
83
80
|
|
84
|
-
def
|
85
|
-
|
81
|
+
def multi_receive_encoded(events_and_encoded)
|
82
|
+
events_and_encoded.each {|event, encoded| self.publish(event,encoded)}
|
86
83
|
end
|
87
84
|
|
88
85
|
private
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-zeromq'
|
4
|
-
s.version = '3.
|
4
|
+
s.version = '3.1.1'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Write events to a 0MQ socket."
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.require_paths = ["lib"]
|
12
12
|
|
13
13
|
# Files
|
14
|
-
s.files = Dir[
|
14
|
+
s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
|
15
15
|
|
16
16
|
# Tests
|
17
17
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
|
21
21
|
|
22
22
|
# Gem dependencies
|
23
|
-
s.add_runtime_dependency "logstash-core-plugin-api", "
|
23
|
+
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60.1", "< 2.99"
|
24
24
|
|
25
25
|
s.add_runtime_dependency 'logstash-codec-json'
|
26
26
|
s.add_runtime_dependency 'logstash-mixin-zeromq', '>= 2.0.0'
|
metadata
CHANGED
@@ -1,74 +1,78 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-zeromq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: logstash-core-plugin-api
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
|
-
- - "
|
16
|
+
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
|
18
|
+
version: 1.60.1
|
19
|
+
- - "<"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.99'
|
22
|
+
name: logstash-core-plugin-api
|
21
23
|
prerelease: false
|
24
|
+
type: :runtime
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.60.1
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
32
|
+
version: '2.99'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: logstash-codec-json
|
29
34
|
requirement: !ruby/object:Gem::Requirement
|
30
35
|
requirements:
|
31
36
|
- - ">="
|
32
37
|
- !ruby/object:Gem::Version
|
33
38
|
version: '0'
|
34
|
-
|
39
|
+
name: logstash-codec-json
|
35
40
|
prerelease: false
|
41
|
+
type: :runtime
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
46
|
version: '0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: logstash-mixin-zeromq
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
44
49
|
requirements:
|
45
50
|
- - ">="
|
46
51
|
- !ruby/object:Gem::Version
|
47
52
|
version: 2.0.0
|
48
|
-
|
53
|
+
name: logstash-mixin-zeromq
|
49
54
|
prerelease: false
|
55
|
+
type: :runtime
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: 2.0.0
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: logstash-devutils
|
57
62
|
requirement: !ruby/object:Gem::Requirement
|
58
63
|
requirements:
|
59
64
|
- - ">="
|
60
65
|
- !ruby/object:Gem::Version
|
61
66
|
version: '0'
|
62
|
-
|
67
|
+
name: logstash-devutils
|
63
68
|
prerelease: false
|
69
|
+
type: :development
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - ">="
|
67
73
|
- !ruby/object:Gem::Version
|
68
74
|
version: '0'
|
69
|
-
description: This gem is a Logstash plugin required to be installed on top of the
|
70
|
-
Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
|
71
|
-
gem is not a stand-alone program
|
75
|
+
description: This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program
|
72
76
|
email: info@elastic.co
|
73
77
|
executables: []
|
74
78
|
extensions: []
|
@@ -80,6 +84,7 @@ files:
|
|
80
84
|
- LICENSE
|
81
85
|
- NOTICE.TXT
|
82
86
|
- README.md
|
87
|
+
- docs/index.asciidoc
|
83
88
|
- lib/logstash/outputs/zeromq.rb
|
84
89
|
- logstash-output-zeromq.gemspec
|
85
90
|
- spec/integration/zeromq_spec.rb
|
@@ -92,7 +97,7 @@ licenses:
|
|
92
97
|
metadata:
|
93
98
|
logstash_plugin: 'true'
|
94
99
|
logstash_group: output
|
95
|
-
post_install_message:
|
100
|
+
post_install_message:
|
96
101
|
rdoc_options: []
|
97
102
|
require_paths:
|
98
103
|
- lib
|
@@ -107,9 +112,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
112
|
- !ruby/object:Gem::Version
|
108
113
|
version: '0'
|
109
114
|
requirements: []
|
110
|
-
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
112
|
-
signing_key:
|
115
|
+
rubyforge_project:
|
116
|
+
rubygems_version: 2.4.8
|
117
|
+
signing_key:
|
113
118
|
specification_version: 4
|
114
119
|
summary: Write events to a 0MQ socket.
|
115
120
|
test_files:
|