logstash-input-tcp 5.0.8-java → 5.0.9-java
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61f75f397819fe7ec52ebe3f7001294b1f9347e116d84ab9136ceb71b9f43694
|
4
|
+
data.tar.gz: 8bbf42e0358a82d6fe8cc05c9c87ad7335866a17f7bec046c414b5899cedb06e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47e0697536fa5ac5a9bb4b8c0ee218d6d99a79fd0a24141a5f0b8c91e72a88d2e1d5c31153cd3b563e1b1e7fc0759f9da9e109ff6cd2453f98f0e3fd68b05866
|
7
|
+
data.tar.gz: d7bd3f0f555f4182753dfa7dbb7d6663b5623c8f10fdff00464a732d9551b0ed89abe7d26f532baaf91f3e94041887e1ea291f8753517113062cfb89c72bd4b7
|
data/CHANGELOG.md
CHANGED
data/docs/index.asciidoc
CHANGED
@@ -88,6 +88,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
88
88
|
| <<plugins-{type}s-{plugin}-ssl_key>> |a valid filesystem path|No
|
89
89
|
| <<plugins-{type}s-{plugin}-ssl_key_passphrase>> |<<password,password>>|No
|
90
90
|
| <<plugins-{type}s-{plugin}-ssl_verify>> |<<boolean,boolean>>|No
|
91
|
+
| <<plugins-{type}s-{plugin}-tcp_keep_alive>> |<<boolean,boolean>>|No
|
91
92
|
|=======================================================================
|
92
93
|
|
93
94
|
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
@@ -182,6 +183,13 @@ SSL key passphrase
|
|
182
183
|
Verify the identity of the other end of the SSL connection against the CA.
|
183
184
|
For input, sets the field `sslsubject` to that of the client certificate.
|
184
185
|
|
186
|
+
[id="plugins-{type}s-{plugin}-tcp_keep_alive"]
|
187
|
+
===== `tcp_keep_alive`
|
188
|
+
|
189
|
+
* Value type is <<boolean,boolean>>
|
190
|
+
* Default value is `false`
|
191
|
+
|
192
|
+
Instruct the socket to use TCP keep alives. Uses OS defaults for keep alive settings.
|
185
193
|
|
186
194
|
|
187
195
|
[id="plugins-{type}s-{plugin}-common-options"]
|
data/lib/logstash/inputs/tcp.rb
CHANGED
@@ -105,6 +105,9 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
|
|
105
105
|
# Useful when the CA chain is not necessary in the system store.
|
106
106
|
config :ssl_extra_chain_certs, :validate => :array, :default => []
|
107
107
|
|
108
|
+
# Instruct the socket to use TCP keep alives. Uses OS defaults for keep alive settings.
|
109
|
+
config :tcp_keep_alive, :validate => :boolean, :default => false
|
110
|
+
|
108
111
|
HOST_FIELD = "host".freeze
|
109
112
|
HOST_IP_FIELD = "[@metadata][ip_address]".freeze
|
110
113
|
PORT_FIELD = "port".freeze
|
@@ -140,7 +143,7 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
|
|
140
143
|
if @ssl_enable
|
141
144
|
self.server_socket = new_server_socket
|
142
145
|
else
|
143
|
-
@loop = InputLoop.new(@host, @port, DecoderImpl.new(@codec, self))
|
146
|
+
@loop = InputLoop.new(@host, @port, DecoderImpl.new(@codec, self), @tcp_keep_alive)
|
144
147
|
end
|
145
148
|
end
|
146
149
|
end
|
@@ -331,19 +334,26 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
|
|
331
334
|
def new_server_socket
|
332
335
|
begin
|
333
336
|
socket = TCPServer.new(@host, @port)
|
337
|
+
socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, @tcp_keep_alive)
|
334
338
|
rescue Errno::EADDRINUSE
|
335
339
|
@logger.error("Could not start TCP server: Address in use", :host => @host, :port => @port)
|
336
340
|
raise
|
337
341
|
end
|
338
342
|
|
339
|
-
@ssl_enable
|
343
|
+
if @ssl_enable
|
344
|
+
socket = OpenSSL::SSL::SSLServer.new(socket, ssl_context)
|
345
|
+
socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, @tcp_keep_alive)
|
346
|
+
end
|
347
|
+
socket
|
340
348
|
end
|
341
349
|
|
342
350
|
def new_client_socket
|
343
351
|
socket = TCPSocket.new(@host, @port)
|
352
|
+
socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, @tcp_keep_alive)
|
344
353
|
|
345
354
|
if @ssl_enable
|
346
355
|
socket = OpenSSL::SSL::SSLSocket.new(socket, ssl_context)
|
356
|
+
socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE, @tcp_keep_alive)
|
347
357
|
socket.connect
|
348
358
|
end
|
349
359
|
|
Binary file
|
data/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.0.
|
1
|
+
5.0.9
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-tcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.9
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,7 +163,7 @@ files:
|
|
163
163
|
- logstash-input-tcp.gemspec
|
164
164
|
- spec/inputs/tcp_spec.rb
|
165
165
|
- spec/spec_helper.rb
|
166
|
-
- vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/5.0.
|
166
|
+
- vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/5.0.9/logstash-input-tcp-5.0.9.jar
|
167
167
|
- version
|
168
168
|
homepage: http://www.elastic.co/guide/en/logstash/current/index.html
|
169
169
|
licenses:
|