logstash-integration-logstash 1.0.1-java → 1.0.3-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/VERSION +1 -1
  4. data/docs/input-logstash.asciidoc +1 -1
  5. data/docs/output-logstash.asciidoc +1 -1
  6. data/lib/logstash/inputs/logstash.rb +4 -2
  7. data/spec/fixtures/certs/generated/client_from_root.jks +0 -0
  8. data/spec/fixtures/certs/generated/client_from_root.key.pem +50 -50
  9. data/spec/fixtures/certs/generated/client_from_root.key.pkcs8.pem +52 -52
  10. data/spec/fixtures/certs/generated/client_from_root.p12 +0 -0
  11. data/spec/fixtures/certs/generated/client_from_root.pem +28 -28
  12. data/spec/fixtures/certs/generated/client_from_untrusted.jks +0 -0
  13. data/spec/fixtures/certs/generated/client_from_untrusted.key.pem +50 -50
  14. data/spec/fixtures/certs/generated/client_from_untrusted.key.pkcs8.pem +52 -52
  15. data/spec/fixtures/certs/generated/client_from_untrusted.p12 +0 -0
  16. data/spec/fixtures/certs/generated/client_from_untrusted.pem +28 -28
  17. data/spec/fixtures/certs/generated/client_self_signed.jks +0 -0
  18. data/spec/fixtures/certs/generated/client_self_signed.key.pem +50 -50
  19. data/spec/fixtures/certs/generated/client_self_signed.key.pkcs8.pem +52 -52
  20. data/spec/fixtures/certs/generated/client_self_signed.p12 +0 -0
  21. data/spec/fixtures/certs/generated/client_self_signed.pem +28 -28
  22. data/spec/fixtures/certs/generated/root.key.pem +50 -50
  23. data/spec/fixtures/certs/generated/root.pem +28 -28
  24. data/spec/fixtures/certs/generated/server_from_root-key-pkcs8.pem +50 -50
  25. data/spec/fixtures/certs/generated/server_from_root.jks +0 -0
  26. data/spec/fixtures/certs/generated/server_from_root.key.pem +50 -50
  27. data/spec/fixtures/certs/generated/server_from_root.key.pkcs8.pem +52 -52
  28. data/spec/fixtures/certs/generated/server_from_root.p12 +0 -0
  29. data/spec/fixtures/certs/generated/server_from_root.pem +29 -29
  30. data/spec/fixtures/certs/generated/untrusted.key.pem +50 -50
  31. data/spec/fixtures/certs/generated/untrusted.pem +28 -28
  32. data/spec/unit/full_transmission_spec.rb +48 -0
  33. metadata +13 -13
@@ -106,6 +106,54 @@ describe 'Logstash Output -> Input complete transmission' do
106
106
  include_examples "large sequence"
107
107
  end
108
108
 
109
+ context 'event decoration' do
110
+ let(:output_config) { {"hosts" => "127.0.0.1:#{port}", "ssl_enabled" => false} }
111
+ let(:input_config) { {"host" => "127.0.0.1", "port" => port, "ssl_enabled" => false} }
112
+
113
+ let(:output_plugin) { LogStash::Outputs::Logstash.new(output_config) }
114
+ let(:input_plugin) { LogStash::Inputs::Logstash.new(input_config) }
115
+
116
+ let(:event_count) { 10 }
117
+ let(:input_events) { (0...event_count).map { |idx| LogStash::Event.new("event" => {"sequence" => idx}) } }
118
+
119
+ include_context 'transmission'
120
+
121
+ context "when configured with `tags` decorator" do
122
+ let(:input_config) { super().merge("tags" => %w(one-tag two-tag)) }
123
+ it 'applies the `tags` decoration' do
124
+ expect(output_events).to_not be_empty
125
+ # expect(output_events).to all(satisfy {|e| e.tags && Array(e.tags).include?('one-tag') && Array(e.tags).include?('two-tag') })
126
+ output_events.each do |output_event|
127
+ expect(output_event).to include 'tags'
128
+ expect(output_event.get('tags')).to include('one-tag').and(include('two-tag'))
129
+ end
130
+ end
131
+ end
132
+ context "when configured with `type` decorator" do
133
+ let(:input_config) { super().merge("type" => "fancy") }
134
+ it 'applies the `type` decoration' do
135
+ expect(output_events).to_not be_empty
136
+ # expect(output_events).to all(satisfy {|e| e.get('type')&.then{ |t| t && t == 'fancy'} })
137
+ output_events.each do |output_event|
138
+ expect(output_event).to include 'type'
139
+ expect(output_event.get('type')).to eq("fancy")
140
+ end
141
+ end
142
+ end
143
+ context "when configured with `add_field`" do
144
+ let(:input_config) { super().merge("add_field" => {"my_field" => "field_value", "another_field" => "another-value"}) }
145
+ it 'applies the `add_field` decoration' do
146
+ expect(output_events).to_not be_empty
147
+ output_events.each do |output_event|
148
+ expect(output_event).to include 'my_field'
149
+ expect(output_event.get('my_field')).to eq("field_value")
150
+ expect(output_event).to include 'another_field'
151
+ expect(output_event.get('another_field')).to eq("another-value")
152
+ end
153
+ end
154
+ end
155
+ end
156
+
109
157
  context 'simple ssl with client authentication none' do
110
158
  let(:input_plugin) {
111
159
  LogStash::Inputs::Logstash.new({
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-integration-logstash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-16 00:00:00.000000000 Z
11
+ date: 2024-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -20,8 +20,8 @@ dependencies:
20
20
  - !ruby/object:Gem::Version
21
21
  version: '2.99'
22
22
  name: logstash-core-plugin-api
23
- prerelease: false
24
23
  type: :runtime
24
+ prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
@@ -37,8 +37,8 @@ dependencies:
37
37
  - !ruby/object:Gem::Version
38
38
  version: '1.0'
39
39
  name: logstash-mixin-plugin_factory_support
40
- prerelease: false
41
40
  type: :runtime
41
+ prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
@@ -51,8 +51,8 @@ dependencies:
51
51
  - !ruby/object:Gem::Version
52
52
  version: '1.1'
53
53
  name: logstash-mixin-validator_support
54
- prerelease: false
55
54
  type: :runtime
55
+ prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
@@ -65,8 +65,8 @@ dependencies:
65
65
  - !ruby/object:Gem::Version
66
66
  version: '3.1'
67
67
  name: logstash-codec-json_lines
68
- prerelease: false
69
68
  type: :runtime
69
+ prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
@@ -79,8 +79,8 @@ dependencies:
79
79
  - !ruby/object:Gem::Version
80
80
  version: '7.3'
81
81
  name: logstash-mixin-http_client
82
- prerelease: false
83
82
  type: :runtime
83
+ prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
@@ -93,8 +93,8 @@ dependencies:
93
93
  - !ruby/object:Gem::Version
94
94
  version: 3.7.0
95
95
  name: logstash-input-http
96
- prerelease: false
97
96
  type: :runtime
97
+ prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - ">="
@@ -107,8 +107,8 @@ dependencies:
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  name: stud
110
- prerelease: false
111
110
  type: :runtime
111
+ prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
@@ -121,8 +121,8 @@ dependencies:
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  name: logstash-devutils
124
- prerelease: false
125
124
  type: :development
125
+ prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
@@ -135,8 +135,8 @@ dependencies:
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  name: rspec-collection_matchers
138
- prerelease: false
139
138
  type: :development
139
+ prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - ">="
@@ -149,8 +149,8 @@ dependencies:
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  name: random-port
152
- prerelease: false
153
152
  type: :development
153
+ prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - ">="
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  - !ruby/object:Gem::Version
234
234
  version: '0'
235
235
  requirements: []
236
- rubygems_version: 3.2.33
236
+ rubygems_version: 3.3.26
237
237
  signing_key:
238
238
  specification_version: 4
239
239
  summary: Collection of Logstash plugins that enable sending events from one Logstash