logstash-output-logmatic 0.3.0 → 1.3.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/README.md +5 -2
- data/lib/logstash/outputs/logmatic.rb +14 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78e815818f397e17e0136b8539928631042a0f9c
|
4
|
+
data.tar.gz: abd0ee5ff43c6a93cfa9d83f3ebb158587d7b607
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dda0489637d42465843759d0138099814fbe91a66237ae0b33fa1b2c5a19a2202ae9d2bc57e30b21f02bae50b247eded4700daa68909a14d67937060234b5dd9
|
7
|
+
data.tar.gz: 404780ad4d51ddecef255ac6fd71bcea9c17b197f66375108de42f49d24cab288f9223ad7179c804eb4cd92c0995703420e39ba11e5a30e1e3c5e256a9305109
|
data/README.md
CHANGED
@@ -8,11 +8,14 @@ This project is an output plugin to send logs to Logmatic.io from Logstash >v1.5
|
|
8
8
|
The gem is published in the main repository.
|
9
9
|
|
10
10
|
```bash
|
11
|
-
# Logstash
|
11
|
+
# Logstash 5.x
|
12
12
|
bin/logstash-plugin install logstash-output-logmatic
|
13
13
|
|
14
|
+
# Logstash 2.x
|
15
|
+
bin/logstash-plugin --version 0.2 logstash-output-logmatic
|
16
|
+
|
14
17
|
# Logstash 1.5x
|
15
|
-
bin/plugin install logstash-output-logmatic
|
18
|
+
bin/plugin install --version 0.2 logstash-output-logmatic
|
16
19
|
```
|
17
20
|
|
18
21
|
Check the installation.
|
@@ -21,7 +21,11 @@ class LogStash::Outputs::LogmaticTcp < LogStash::Outputs::Base
|
|
21
21
|
|
22
22
|
# When mode is `server`, the port to listen on.
|
23
23
|
# When mode is `client`, the port to connect to.
|
24
|
-
config :port, :validate => :number, :default =>
|
24
|
+
config :port, :validate => :number, :default => 10515
|
25
|
+
|
26
|
+
|
27
|
+
# When use_ssl is `true`, the connection is secure.
|
28
|
+
config :use_ssl, :validate => :boolean, :default => true
|
25
29
|
|
26
30
|
# The Logmatic api key
|
27
31
|
# You can find it in the 'Account' section in the Logmatic interface.
|
@@ -109,7 +113,6 @@ class LogStash::Outputs::LogmaticTcp < LogStash::Outputs::Base
|
|
109
113
|
client_socket.sysread(16384) if r.any?
|
110
114
|
|
111
115
|
# Now send the payload
|
112
|
-
@logger.debug(@key);
|
113
116
|
client_socket.syswrite(@key + " " + payload+"\n") if w.any?
|
114
117
|
rescue => e
|
115
118
|
@logger.warn("tcp output exception", :host => @host, :port => @port,
|
@@ -126,7 +129,15 @@ class LogStash::Outputs::LogmaticTcp < LogStash::Outputs::Base
|
|
126
129
|
private
|
127
130
|
def connect
|
128
131
|
Stud::try do
|
129
|
-
|
132
|
+
socket ||= if @use_ssl
|
133
|
+
context = OpenSSL::SSL::SSLContext.new
|
134
|
+
socket = TCPSocket.new @host, @port
|
135
|
+
ssl_client = OpenSSL::SSL::SSLSocket.new socket, context
|
136
|
+
ssl_client.connect
|
137
|
+
else
|
138
|
+
TCPSocket.new @host, @port
|
139
|
+
end
|
140
|
+
return socket
|
130
141
|
end
|
131
142
|
end # def connect
|
132
143
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-logmatic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Logmatic support team
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: logstash-core
|
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
version: '0'
|
64
64
|
requirements: []
|
65
65
|
rubyforge_project:
|
66
|
-
rubygems_version: 2.
|
66
|
+
rubygems_version: 2.6.8
|
67
67
|
signing_key:
|
68
68
|
specification_version: 4
|
69
69
|
summary: Logmatic output plugin for Logstash
|