logstash-input-udp 3.4.1 → 3.5.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 +1 -1
- data/logstash-input-udp.gemspec +2 -2
- data/spec/inputs/udp_spec.rb +20 -17
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95704767af49439b51bff2740c3610e4024d129e176731aaaf1fbb21e9c1591c
|
4
|
+
data.tar.gz: b200bb9494788fcf67b1317f6245783b5c78affdfb775c0fe87f87f2fe666bf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87cc33004359edab4a71b0bed40c245e649e8bee97d085cd72944acc6132acd8f08f6852d06063854069c866a4208e02de06b5bcc74304e7dcf0ee851da8dd8f
|
7
|
+
data.tar.gz: e5dd436740b09ac4c4888154319cb7ced54e7f0eee99da211267c0438b45d54a9a892e14ce14e132a235fe9466d25014ebe2e7b4f5b79142281a24bc2aed7836
|
data/CHANGELOG.md
CHANGED
data/lib/logstash/inputs/udp.rb
CHANGED
@@ -13,7 +13,7 @@ require "logstash/plugin_mixins/ecs_compatibility_support"
|
|
13
13
|
#
|
14
14
|
class LogStash::Inputs::Udp < LogStash::Inputs::Base
|
15
15
|
# adds ecs_compatibility config which could be :disabled or :v1
|
16
|
-
include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled
|
16
|
+
include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled, :v1, :v8 => :v1)
|
17
17
|
|
18
18
|
config_name "udp"
|
19
19
|
|
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.
|
4
|
+
s.version = '3.5.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Reads events over 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"
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
|
25
25
|
s.add_runtime_dependency 'logstash-codec-plain'
|
26
26
|
s.add_runtime_dependency 'stud', '~> 0.0.22'
|
27
|
-
s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.
|
27
|
+
s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.2'
|
28
28
|
s.add_development_dependency 'logstash-codec-line'
|
29
29
|
s.add_development_dependency 'logstash-devutils'
|
30
30
|
end
|
data/spec/inputs/udp_spec.rb
CHANGED
@@ -72,30 +72,33 @@ describe LogStash::Inputs::Udp do
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
-
shared_examples "
|
76
|
-
|
77
|
-
|
78
|
-
|
75
|
+
shared_examples "respects ECS compatibility setting host metadata" do |ecs_compatibility, field_name|
|
76
|
+
context "when ecs_compatibility is `#{ecs_compatibility}`" do
|
77
|
+
let(:config) { { "port" => port, "workers" => 1, "ecs_compatibility" => ecs_compatibility} }
|
78
|
+
let(:localhost) { "127.0.0.1" }
|
79
|
+
let(:client) { LogStash::Inputs::Test::UDPClient.new(port, localhost) }
|
79
80
|
|
80
|
-
|
81
|
-
|
82
|
-
|
81
|
+
let(:events) do
|
82
|
+
helper.input(subject, 1) do
|
83
|
+
client.send("line1")
|
84
|
+
end
|
83
85
|
end
|
84
|
-
end
|
85
86
|
|
86
|
-
|
87
|
-
|
88
|
-
|
87
|
+
before(:each) do
|
88
|
+
subject.register
|
89
|
+
end
|
89
90
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
91
|
+
it "produces event with source_ip_fieldname as '#{field_name}'" do
|
92
|
+
expect(events.size).to be(1)
|
93
|
+
message = events.last
|
94
|
+
expect(message.get(field_name)).to eq(client.host)
|
95
|
+
end
|
94
96
|
end
|
95
97
|
end
|
96
98
|
|
97
|
-
it_behaves_like "
|
98
|
-
it_behaves_like "
|
99
|
+
it_behaves_like "respects ECS compatibility setting host metadata", :disabled, "host"
|
100
|
+
it_behaves_like "respects ECS compatibility setting host metadata", :v1, "[host][ip]"
|
101
|
+
it_behaves_like "respects ECS compatibility setting host metadata", :v8, "[host][ip]"
|
99
102
|
|
100
103
|
|
101
104
|
|
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.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ dependencies:
|
|
63
63
|
requirements:
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: '1.
|
66
|
+
version: '1.2'
|
67
67
|
name: logstash-mixin-ecs_compatibility_support
|
68
68
|
prerelease: false
|
69
69
|
type: :runtime
|
@@ -71,7 +71,7 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '1.
|
74
|
+
version: '1.2'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
@@ -141,8 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
requirements: []
|
144
|
-
|
145
|
-
rubygems_version: 2.6.13
|
144
|
+
rubygems_version: 3.1.6
|
146
145
|
signing_key:
|
147
146
|
specification_version: 4
|
148
147
|
summary: Reads events over UDP
|