logstash-mixin-rabbitmq_connection 2.3.1-java → 2.4.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/CHANGELOG +3 -0
- data/lib/logstash/plugin_mixins/rabbitmq_connection.rb +11 -2
- data/logstash-mixin-rabbitmq_connection.gemspec +1 -1
- data/spec/plugin_mixins/rabbitmq_connection_spec.rb +23 -2
- metadata +24 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa859308506de4169949b7208483cbd08b4732c2
|
4
|
+
data.tar.gz: cbc12c2819c8ae228a202c3576c39ff42e4ce278
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63a90f139dc4fa0233aafb10df394c868a7e1b67592a40e0e6447dc81dcd6dbb33174fa6999227ae18088f016f8e8006e7fab8aaf3d9c15d9131f48794775722
|
7
|
+
data.tar.gz: e36ba70d5c725dc13e14a62a481cbfb83db0ba74e34772057fd827870c2f1acb48da9f98d35d195167d67c64df93b714316fdab6614f2ebcb17423641f984e51
|
data/.travis.yml
ADDED
data/CHANGELOG
CHANGED
@@ -8,7 +8,7 @@ require "java"
|
|
8
8
|
module LogStash
|
9
9
|
module PluginMixins
|
10
10
|
module RabbitMQConnection
|
11
|
-
EXCHANGE_TYPES = ["fanout", "direct", "topic"]
|
11
|
+
EXCHANGE_TYPES = ["fanout", "direct", "topic", "x-consistent-hash", "x-modulus-hash"]
|
12
12
|
|
13
13
|
HareInfo = Struct.new(:connection, :channel, :exchange, :queue)
|
14
14
|
|
@@ -37,7 +37,8 @@ module LogStash
|
|
37
37
|
config :vhost, :validate => :string, :default => "/"
|
38
38
|
|
39
39
|
# Enable or disable SSL
|
40
|
-
|
40
|
+
# Specify TLS version if using TLS e.g "TLSv1.2"
|
41
|
+
config :ssl, :validate => :string
|
41
42
|
|
42
43
|
# Validate SSL certificate
|
43
44
|
config :verify_ssl, :validate => :boolean, :default => false
|
@@ -60,6 +61,12 @@ module LogStash
|
|
60
61
|
# Passive queue creation? Useful for checking queue existance without modifying server state
|
61
62
|
config :passive, :validate => :boolean, :default => false
|
62
63
|
|
64
|
+
# TLS certifcate path
|
65
|
+
config :tls_certificate_path, :validate => :path
|
66
|
+
|
67
|
+
# TLS certificate password
|
68
|
+
config :tls_certificate_password, :validate => :string
|
69
|
+
|
63
70
|
# Extra queue arguments as an array.
|
64
71
|
# To make a RabbitMQ queue mirrored, use: `{"x-ha-policy" => "all"}`
|
65
72
|
config :arguments, :validate => :array, :default => {}
|
@@ -90,6 +97,8 @@ module LogStash
|
|
90
97
|
s[:timeout] = @connection_timeout || 0
|
91
98
|
s[:heartbeat] = @heartbeat || 0
|
92
99
|
s[:tls] = @ssl if @ssl
|
100
|
+
s[:tls_certificate_path] = @tls_certificate_path || ""
|
101
|
+
s[:tls_certificate_password] = @tls_certificate_password || ""
|
93
102
|
@rabbitmq_settings = s
|
94
103
|
end
|
95
104
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-mixin-rabbitmq_connection'
|
3
|
-
s.version = '2.
|
3
|
+
s.version = '2.4.0'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "Common functionality for RabbitMQ plugins"
|
6
6
|
s.description = "This is used to provide configuration options and connection settings for logstash plugins working with RabbitMQ"
|
@@ -2,6 +2,7 @@
|
|
2
2
|
require "logstash/devutils/rspec/spec_helper"
|
3
3
|
require "logstash/pipeline"
|
4
4
|
require "logstash/plugin_mixins/rabbitmq_connection"
|
5
|
+
require "stud/temporary"
|
5
6
|
|
6
7
|
class TestPlugin < LogStash::Outputs::Base
|
7
8
|
include LogStash::PluginMixins::RabbitMQConnection
|
@@ -27,7 +28,15 @@ describe LogStash::PluginMixins::RabbitMQConnection do
|
|
27
28
|
let(:hare_info) { instance.instance_variable_get(:@hare_info) }
|
28
29
|
|
29
30
|
describe "rabbitmq_settings" do
|
30
|
-
let(:
|
31
|
+
let(:file) { Stud::Temporary.file }
|
32
|
+
let(:path) { file.path }
|
33
|
+
after { File.unlink(path)}
|
34
|
+
|
35
|
+
let(:rabbitmq_settings) { super.merge({"connection_timeout" => 123,
|
36
|
+
"heartbeat" => 456,
|
37
|
+
"ssl" => "TLS1.2",
|
38
|
+
"tls_certificate_path" => path,
|
39
|
+
"tls_certificate_password" => "123"}) }
|
31
40
|
|
32
41
|
it "should set the timeout to the expected value" do
|
33
42
|
expect(instance.rabbitmq_settings[:timeout]).to eql(rabbitmq_settings["connection_timeout"])
|
@@ -36,6 +45,18 @@ describe LogStash::PluginMixins::RabbitMQConnection do
|
|
36
45
|
it "should set heartbeat to the expected value" do
|
37
46
|
expect(instance.rabbitmq_settings[:heartbeat]).to eql(rabbitmq_settings["heartbeat"])
|
38
47
|
end
|
48
|
+
|
49
|
+
it "should set tls to the expected value" do
|
50
|
+
expect(instance.rabbitmq_settings[:tls]).to eql(rabbitmq_settings["ssl"])
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should set tls_certificate_path to the expected value" do
|
54
|
+
expect(instance.rabbitmq_settings[:tls_certificate_path]).to eql(rabbitmq_settings["tls_certificate_path"])
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should set tls_certificate_password to the expected value" do
|
58
|
+
expect(instance.rabbitmq_settings[:tls_certificate_password]).to eql(rabbitmq_settings["tls_certificate_password"])
|
59
|
+
end
|
39
60
|
end
|
40
61
|
|
41
62
|
context "when connected" do
|
@@ -112,4 +133,4 @@ describe LogStash::PluginMixins::RabbitMQConnection do
|
|
112
133
|
expect(subject).to have_received(:sleep_for_retry).once
|
113
134
|
end
|
114
135
|
end
|
115
|
-
end
|
136
|
+
end
|
metadata
CHANGED
@@ -1,99 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-mixin-rabbitmq_connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: logstash-core-plugin-api
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
14
20
|
requirement: !ruby/object:Gem::Requirement
|
15
21
|
requirements:
|
16
22
|
- - ~>
|
17
23
|
- !ruby/object:Gem::Version
|
18
24
|
version: '1.0'
|
19
|
-
name: logstash-core-plugin-api
|
20
25
|
prerelease: false
|
21
26
|
type: :runtime
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: march_hare
|
22
29
|
version_requirements: !ruby/object:Gem::Requirement
|
23
30
|
requirements:
|
24
31
|
- - ~>
|
25
32
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version: 2.15.0
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
29
35
|
requirements:
|
30
36
|
- - ~>
|
31
37
|
- !ruby/object:Gem::Version
|
32
38
|
version: 2.15.0
|
33
|
-
name: march_hare
|
34
39
|
prerelease: false
|
35
40
|
type: :runtime
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: stud
|
36
43
|
version_requirements: !ruby/object:Gem::Requirement
|
37
44
|
requirements:
|
38
45
|
- - ~>
|
39
46
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
- !ruby/object:Gem::Dependency
|
47
|
+
version: 0.0.22
|
42
48
|
requirement: !ruby/object:Gem::Requirement
|
43
49
|
requirements:
|
44
50
|
- - ~>
|
45
51
|
- !ruby/object:Gem::Version
|
46
52
|
version: 0.0.22
|
47
|
-
name: stud
|
48
53
|
prerelease: false
|
49
54
|
type: :runtime
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: logstash-devutils
|
50
57
|
version_requirements: !ruby/object:Gem::Requirement
|
51
58
|
requirements:
|
52
|
-
- -
|
59
|
+
- - '>='
|
53
60
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0
|
55
|
-
- !ruby/object:Gem::Dependency
|
61
|
+
version: '0'
|
56
62
|
requirement: !ruby/object:Gem::Requirement
|
57
63
|
requirements:
|
58
64
|
- - '>='
|
59
65
|
- !ruby/object:Gem::Version
|
60
66
|
version: '0'
|
61
|
-
name: logstash-devutils
|
62
67
|
prerelease: false
|
63
68
|
type: :development
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: logstash-input-generator
|
64
71
|
version_requirements: !ruby/object:Gem::Requirement
|
65
72
|
requirements:
|
66
73
|
- - '>='
|
67
74
|
- !ruby/object:Gem::Version
|
68
75
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
76
|
requirement: !ruby/object:Gem::Requirement
|
71
77
|
requirements:
|
72
78
|
- - '>='
|
73
79
|
- !ruby/object:Gem::Version
|
74
80
|
version: '0'
|
75
|
-
name: logstash-input-generator
|
76
81
|
prerelease: false
|
77
82
|
type: :development
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: logstash-codec-json
|
78
85
|
version_requirements: !ruby/object:Gem::Requirement
|
79
86
|
requirements:
|
80
87
|
- - '>='
|
81
88
|
- !ruby/object:Gem::Version
|
82
89
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
90
|
requirement: !ruby/object:Gem::Requirement
|
85
91
|
requirements:
|
86
92
|
- - '>='
|
87
93
|
- !ruby/object:Gem::Version
|
88
94
|
version: '0'
|
89
|
-
name: logstash-codec-json
|
90
95
|
prerelease: false
|
91
96
|
type: :development
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - '>='
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
97
|
description: This is used to provide configuration options and connection settings for logstash plugins working with RabbitMQ
|
98
98
|
email: info@elastic.co
|
99
99
|
executables: []
|
@@ -101,6 +101,7 @@ extensions: []
|
|
101
101
|
extra_rdoc_files: []
|
102
102
|
files:
|
103
103
|
- .gitignore
|
104
|
+
- .travis.yml
|
104
105
|
- CHANGELOG
|
105
106
|
- Gemfile
|
106
107
|
- README.md
|
@@ -128,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
129
|
version: '0'
|
129
130
|
requirements: []
|
130
131
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.4.
|
132
|
+
rubygems_version: 2.4.8
|
132
133
|
signing_key:
|
133
134
|
specification_version: 4
|
134
135
|
summary: Common functionality for RabbitMQ plugins
|