logstash-input-udp 3.0.3 → 3.1.0
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 +3 -0
- data/lib/logstash/inputs/udp.rb +16 -0
- data/logstash-input-udp.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: 66b8c3d8e6fe3922ae1d3ef054605c9285fe444d
|
4
|
+
data.tar.gz: 3dceb140b822416183f7fec88e907b5c1ba83d58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23dc702f871475e4e0a748c824fac1448a6e441ebd71207664e1f0012cba012958f18bd8cf658c681735c73686a8664d2b231de33a4d6f292f333107637bc9ce
|
7
|
+
data.tar.gz: acd913f82a7c813d872bcc56467245cd74493718cb6edd7cbdbb2772d1e5530a60f78bb1e39761dbac570ea5280961dc92c008f6bf703c75967bb943ce5fa4b4
|
data/CHANGELOG.md
CHANGED
data/lib/logstash/inputs/udp.rb
CHANGED
@@ -24,6 +24,12 @@ class LogStash::Inputs::Udp < LogStash::Inputs::Base
|
|
24
24
|
# The maximum packet size to read from the network
|
25
25
|
config :buffer_size, :validate => :number, :default => 65536
|
26
26
|
|
27
|
+
# The socket receive buffer size in bytes.
|
28
|
+
# If option is not set, the operating system default is used.
|
29
|
+
# The operating system will use the max allowed value if receive_buffer_bytes is larger than allowed.
|
30
|
+
# Consult your operating system documentation if you need to increase this max allowed value.
|
31
|
+
config :receive_buffer_bytes, :validate => :number
|
32
|
+
|
27
33
|
# Number of threads processing packets
|
28
34
|
config :workers, :validate => :number, :default => 2
|
29
35
|
|
@@ -64,7 +70,17 @@ class LogStash::Inputs::Udp < LogStash::Inputs::Base
|
|
64
70
|
end
|
65
71
|
|
66
72
|
@udp = UDPSocket.new(Socket::AF_INET)
|
73
|
+
# set socket receive buffer size if configured
|
74
|
+
if @receive_buffer_bytes
|
75
|
+
@udp.setsockopt(Socket::SOL_SOCKET, Socket::SO_RCVBUF, @receive_buffer_bytes)
|
76
|
+
end
|
77
|
+
rcvbuf = @udp.getsockopt(Socket::SOL_SOCKET, Socket::SO_RCVBUF).unpack("i")[0]
|
78
|
+
if @receive_buffer_bytes && rcvbuf != @receive_buffer_bytes
|
79
|
+
@logger.warn("Unable to set receive_buffer_bytes to desired size. Requested #{@receive_buffer_bytes} but obtained #{rcvbuf} bytes.")
|
80
|
+
end
|
81
|
+
|
67
82
|
@udp.bind(@host, @port)
|
83
|
+
@logger.info("UDP listener started", :address => "#{@host}:#{@port}", :receive_buffer_bytes => "#{rcvbuf}", :queue_size => "#{@queue_size}")
|
68
84
|
|
69
85
|
@input_to_worker = SizedQueue.new(@queue_size)
|
70
86
|
|
data/logstash-input-udp.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-udp'
|
4
|
-
s.version = '3.0
|
4
|
+
s.version = '3.1.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Read messages as events over the network via udp."
|
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"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-udp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|