logstash-output-faye 2.0.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/outputs/faye.rb +30 -6
- data/logstash-output-faye.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f14c9e20d2204311cdccceec95ded7c923d5e5a7
|
4
|
+
data.tar.gz: a99909df0a849b645c0dcd51c3c8321889e9c5ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cbb7b72491bcb996d67dd93c797a8027eabbe4d25ca897885e0e95166bc2885d3d18f4a8d881cb5021162c336a7f2bc790aa347883e7cee5036812c695bd226
|
7
|
+
data.tar.gz: e33ebe3ae1126d536b08554bbbb13bc028742b6e805af38798edd912a68bace4d3c0d0e91c49477e58cc144158eb68e99e959ded9516c8792bd70d6ddeea0f70
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 2.1.0
|
2
|
+
- Option for SSL-verification
|
3
|
+
|
1
4
|
## 2.0.0
|
2
5
|
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
|
3
6
|
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
|
@@ -19,7 +19,15 @@ class LogStash::Outputs::Faye < LogStash::Outputs::Base
|
|
19
19
|
config :faye_token, :validate => :string
|
20
20
|
|
21
21
|
# Url of the faye-server
|
22
|
-
config :
|
22
|
+
config :url, :validate => :string, :default => "http://localhost:9292/faye"
|
23
|
+
|
24
|
+
# If TLS/SSL is used (because the `url` is "https://...", then this
|
25
|
+
# setting will determine if certificate validation is done.
|
26
|
+
#
|
27
|
+
# Note: If you set this to false, you will be destroying the security
|
28
|
+
# features provided by TLS. Setting this to false is never recommended,
|
29
|
+
# especially never in production.
|
30
|
+
config :verify_ssl, :validate => :boolean, :default => true
|
23
31
|
|
24
32
|
public
|
25
33
|
def register
|
@@ -41,15 +49,31 @@ class LogStash::Outputs::Faye < LogStash::Outputs::Base
|
|
41
49
|
message = {:channel => @channel, :data => data}
|
42
50
|
end
|
43
51
|
|
44
|
-
uri = URI.parse(@
|
45
|
-
|
52
|
+
uri = URI.parse(@url)
|
53
|
+
|
54
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
55
|
+
|
56
|
+
if uri.scheme == 'https'
|
57
|
+
http.use_ssl = true
|
58
|
+
|
59
|
+
if !@verify_ssl
|
60
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
61
|
+
else
|
62
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
request = Net::HTTP::Post.new(uri.path)
|
67
|
+
request.set_form_data(:message => message.to_json)
|
68
|
+
|
69
|
+
response = http.request(request)
|
46
70
|
|
47
|
-
if
|
48
|
-
message = JSON.parse(
|
71
|
+
if response.is_a?(Net::HTTPSuccess)
|
72
|
+
message = JSON.parse(response.body)
|
49
73
|
|
50
74
|
@logger.warn("Faye request was not successfully", message.first) unless message.first['successful']
|
51
75
|
else
|
52
|
-
@logger.warn("Faye response not ok", :http_status =>
|
76
|
+
@logger.warn("Faye response not ok", :http_status => response.code, :message => response.message)
|
53
77
|
end
|
54
78
|
|
55
79
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-faye'
|
4
|
-
s.version = '2.
|
4
|
+
s.version = '2.1.1'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Send event to faye-message-server"
|
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/plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-faye
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Signify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|