logstash-input-beats 6.1.3-java → 6.2.0-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: e3d70597b1b447c581f1a7c6d9757aeff377cb57f9e0bf30ae62a1a82ae2e3d7
4
- data.tar.gz: f2fbd686d950b35fb9d337330e226029b4dce5eaaf56e3ac31722cc6dbd849ac
3
+ metadata.gz: 16a55f0a53247ed30b7110d9f60dce425288fdd68c1bf936283698028bdfd421
4
+ data.tar.gz: d8cda82e3d3a8fb3ceef48a96f52674eb04496e7a0957043b34d5c5e741484fa
5
5
  SHA512:
6
- metadata.gz: 892b7166ecd256432677e4bda1dbc2ebd4c9555fc2aecf26e73ed0d2747b2e736b6e1421582b3ec786ba6bef4c6a705c4c0a6d0b54423980c0f9f7ddbf4ddaf9
7
- data.tar.gz: e8101ebad94b1924d68a2000b8c2b9c9996ef2634fcb1e8d87d445e64941b5278b6af8c24d7f93e3c271638028f36f258c717d9401595c213a3f99ec46f138ed
6
+ metadata.gz: e2869c6c573223e979f411c430ce1ddb6f65f6c967930b469c617a03b6a4fb0417a7eecfc23e2c8061599a72a07f656490bb76c9ceb5576f00613be0cdfde688
7
+ data.tar.gz: 38dd3f7bfb548565ecc047bc0e044e89796f2fcbdf8187f2b3a37fc1bb822a00d73c759713996dd69471fbaa1e334fd3a4b1e730adcb0093ccf6956f14f4549e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## 6.2.0
2
+ - ECS compatibility enablement: Adds alias to support upcoming ECS v8 with the existing ECS v1 implementation
3
+
4
+ ## 6.1.7
5
+ - [DOC] Remove limitations topic and link [#428](https://github.com/logstash-plugins/logstash-input-http/pull/428)
6
+
7
+ ## 6.1.6
8
+ - [DOC] Applied more attributes to manage plugin name in doc content, and implemented conditional text processing. [#423](https://github.com/logstash-plugins/logstash-input-http/pull/423)
9
+
10
+ ## 6.1.5
11
+ - Changed jar dependencies to reflect newer versions [#425](https://github.com/logstash-plugins/logstash-input-beats/pull/425)
12
+
13
+ ## 6.1.4
14
+ - Fix: reduce error logging on connection resets [#424](https://github.com/logstash-plugins/logstash-input-beats/pull/424)
15
+
1
16
  ## 6.1.3
2
17
  - Fix: safe-guard byte buf allocation [#420](https://github.com/logstash-plugins/logstash-input-beats/pull/420)
3
18
  - Updated Jackson dependencies
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.1.3
1
+ 6.2.0
data/docs/index.asciidoc CHANGED
@@ -2,6 +2,7 @@
2
2
  :type: input
3
3
  :default_codec: plain
4
4
  :plugin-uc: Beats
5
+ :plugin-singular: Beat
5
6
 
6
7
  ///////////////////////////////////////////
7
8
  START - GENERATED VARIABLES, DO NOT EDIT!
@@ -18,21 +19,27 @@ END - GENERATED VARIABLES, DO NOT EDIT!
18
19
 
19
20
  === {plugin-uc} input plugin
20
21
 
22
+ NOTE: The `input-elastic_agent` plugin is the next generation of the
23
+ `input-beats` plugin.
24
+ They currently share code and a https://github.com/logstash-plugins/logstash-input-beats[common codebase].
25
+
21
26
  include::{include_path}/plugin_header.asciidoc[]
22
27
 
23
28
  ==== Description
24
29
 
25
30
  This input plugin enables Logstash to receive events from the
26
- https://www.elastic.co/products/beats[Elastic Beats] framework.
31
+ {plugin-uc} framework.
27
32
 
28
33
  The following example shows how to configure Logstash to listen on port
29
34
  5044 for incoming {plugin-uc} connections and to index into Elasticsearch.
30
35
 
36
+ //Example for Beats
37
+ ifeval::["{plugin}"=="beats"]
31
38
  ["source","sh",subs="attributes"]
32
39
  -----
33
40
 
34
41
  input {
35
- beats {
42
+ {plugin} {
36
43
  port => 5044
37
44
  }
38
45
  }
@@ -45,9 +52,8 @@ output {
45
52
  }
46
53
  -----
47
54
  <1> `%{[@metadata][beat]}` sets the first part of the index name to the value
48
- of the `beat` metadata field and `%{[@metadata][version]}` sets the second part to
49
- the {plugin-uc}'s version. For example:
50
- metricbeat-7.4.0.
55
+ of the metadata field and `%{[@metadata][version]}` sets the second part to
56
+ the {plugin-singular} version. For example: metricbeat-6.1.6.
51
57
 
52
58
  Events indexed into Elasticsearch with the Logstash configuration shown here
53
59
  will be similar to events directly indexed by {plugin-uc} into Elasticsearch.
@@ -56,14 +62,47 @@ NOTE: If ILM is not being used, set `index` to
56
62
  `%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}` instead so
57
63
  Logstash creates an index per day, based on the `@timestamp` value of the events
58
64
  coming from {plugin-uc}.
65
+ endif::[]
66
+
67
+ //Example for Elastic Agent
68
+ ifeval::["{plugin}"!="beats"]
69
+ ["source","sh",subs="attributes"]
70
+ -----
71
+
72
+ input {
73
+ {plugin} {
74
+ port => 5044
75
+ }
76
+ }
77
+
78
+ output {
79
+ elasticsearch {
80
+ hosts => ["http://localhost:9200"]
81
+ data_stream => "true"
82
+ }
83
+ }
84
+ -----
85
+
86
+ Events indexed into Elasticsearch with the Logstash configuration shown here
87
+ will be similar to events directly indexed by {plugin-uc} into Elasticsearch.
88
+ endif::[]
89
+
90
+
91
+ //Content for Beats
92
+ ifeval::["{plugin}"=="beats"]
93
+ [id="plugins-{type}s-{plugin}-multiline"]
94
+ ===== Multi-line events
59
95
 
60
- IMPORTANT: If you are shipping events that span multiple lines, you need to use
96
+ If you are shipping events that span multiple lines, you need to use
61
97
  the {filebeat-ref}/multiline-examples.html[configuration options available in
62
98
  Filebeat] to handle multiline events before sending the event data to Logstash.
63
99
  You cannot use the {logstash-ref}/plugins-codecs-multiline.html[Multiline codec
64
100
  plugin] to handle multiline events. Doing so will result in the failure to start
65
101
  Logstash.
102
+ endif::[]
66
103
 
104
+ //Content for Beats
105
+ ifeval::["{plugin}"=="beats"]
67
106
  [id="plugins-{type}s-{plugin}-versioned-indexes"]
68
107
  ==== Versioned indices
69
108
 
@@ -86,6 +125,7 @@ Logstash `@timestamp` field.
86
125
 
87
126
  This configuration results in daily index names like
88
127
  +filebeat-{logstash_version}-{localdate}+.
128
+ endif::[]
89
129
 
90
130
 
91
131
  [id="plugins-{type}s-{plugin}-ecs_metadata"]
@@ -101,18 +141,18 @@ output.
101
141
 
102
142
  [cols="<l,<l,e,<e"]
103
143
  |=======================================================================
104
- |ECS disabled |ECS v1 |Availability |Description
144
+ |ECS `disabled` |ECS `v1`, `v8` |Availability |Description
105
145
 
106
- |[host] |[@metadata][input][beats][host][name] |Always |Name or address of the beat host
107
- |[@metadata][ip_address] |[@metadata][input][beats][host][ip] |Always |IP address of the Beats client
108
- |[@metadata][tls_peer][status] | [@metadata][tls_peer][status] | When SSL related fields are populated | Contains "verified"/"unverified" labels in `disabled`, `true`/`false` in `v1`
146
+ |[host] |[@metadata][input][beats][host][name] |Always |Name or address of the {plugin-singular} host
147
+ |[@metadata][ip_address] |[@metadata][input][beats][host][ip] |Always |IP address of the {plugin-uc} client
148
+ |[@metadata][tls_peer][status] | [@metadata][tls_peer][status] | When SSL related fields are populated | Contains "verified"/"unverified" labels in `disabled`, `true`/`false` in `v1`/`v8`
109
149
  |[@metadata][tls_peer][protocol] | [@metadata][input][beats][tls][version_protocol] | When SSL status is "verified" | Contains the TLS version used (e.g. `TLSv1.2`)
110
150
  |[@metadata][tls_peer][subject] | [@metadata][input][beats][tls][client][subject] | When SSL status is "verified" | Contains the identity name of the remote end (e.g. `CN=artifacts-no-kpi.elastic.co`)
111
151
  |[@metadata][tls_peer][cipher_suite] | [@metadata][input][beats][tls][cipher] | When SSL status is "verified" | Contains the name of cipher suite used (e.g. `TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256`)
112
152
  |=======================================================================
113
153
 
114
154
  [id="plugins-{type}s-{plugin}-options"]
115
- ==== {plugin-uc} Input Configuration Options
155
+ ==== {plugin-uc} input configuration options
116
156
 
117
157
  This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
118
158
 
@@ -151,7 +191,7 @@ input plugins.
151
191
  * Value type is <<boolean,boolean>>
152
192
  * Default value is `false`
153
193
 
154
- Flag to determine whether to add `host` field to event using the value supplied by the beat in the `hostname` field.
194
+ Flag to determine whether to add `host` field to event using the value supplied by the {plugin-singular} in the `hostname` field.
155
195
 
156
196
 
157
197
  [id="plugins-{type}s-{plugin}-cipher_suites"]
@@ -176,7 +216,8 @@ Close Idle clients after X seconds of inactivity.
176
216
  * Value type is <<string,string>>
177
217
  * Supported values are:
178
218
  ** `disabled`: unstructured connection metadata added at root level
179
- ** `v1`: structured connection metadata added under ECS compliant namespaces
219
+ ** `v1`: structured connection metadata added under ECS v1 compliant namespaces
220
+ ** `v8`: structured connection metadata added under ECS v8 compliant namespaces
180
221
  * Default value depends on which version of Logstash is running:
181
222
  ** When Logstash provides a `pipeline.ecs_compatibility` setting, its value is used as the default
182
223
  ** Otherwise, the default value is `disabled`.
@@ -1,11 +1,11 @@
1
1
  # AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.
2
2
 
3
3
  require 'jar_dependencies'
4
- require_jar('io.netty', 'netty-all', '4.1.49.Final')
4
+ require_jar('io.netty', 'netty-all', '4.1.65.Final')
5
5
  require_jar('org.javassist', 'javassist', '3.24.0-GA')
6
6
  require_jar('com.fasterxml.jackson.core', 'jackson-core', '2.9.10')
7
7
  require_jar('com.fasterxml.jackson.core', 'jackson-annotations', '2.9.10')
8
8
  require_jar('com.fasterxml.jackson.core', 'jackson-databind', '2.9.10.8')
9
9
  require_jar('com.fasterxml.jackson.module', 'jackson-module-afterburner', '2.9.10')
10
10
  require_jar('org.apache.logging.log4j', 'log4j-api', '2.11.1')
11
- require_jar('org.logstash.beats', 'logstash-input-beats', '6.1.3')
11
+ require_jar('org.logstash.beats', 'logstash-input-beats', '6.2.0')
@@ -6,6 +6,7 @@ require "logstash/codecs/multiline"
6
6
  require "logstash/util"
7
7
  require "logstash-input-beats_jars"
8
8
  require "logstash/plugin_mixins/ecs_compatibility_support"
9
+ require 'logstash/plugin_mixins/event_support/event_factory_adapter'
9
10
  require_relative "beats/patch"
10
11
 
11
12
  # This input plugin enables Logstash to receive events from the
@@ -51,7 +52,9 @@ class LogStash::Inputs::Beats < LogStash::Inputs::Base
51
52
  require "logstash/inputs/beats/tls"
52
53
 
53
54
  # adds ecs_compatibility config which could be :disabled or :v1
54
- include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled,:v1)
55
+ include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled,:v1, :v8 => :v1)
56
+
57
+ include LogStash::PluginMixins::EventSupport::EventFactoryAdapter
55
58
 
56
59
  config_name "beats"
57
60
 
@@ -15,6 +15,8 @@ module LogStash module Inputs class Beats
15
15
 
16
16
  attr_reader :logger, :input, :connections_list
17
17
 
18
+ attr_reader :event_factory
19
+
18
20
  def initialize(queue, input)
19
21
  @connections_list = ThreadSafe::Hash.new
20
22
  @queue = queue
@@ -25,6 +27,7 @@ module LogStash module Inputs class Beats
25
27
 
26
28
  @nocodec_transformer = RawEventTransform.new(@input)
27
29
  @codec_transformer = DecodedEventTransform.new(@input)
30
+ @event_factory = input.event_factory
28
31
  end
29
32
 
30
33
  def onNewMessage(ctx, message)
@@ -39,7 +42,7 @@ module LogStash module Inputs class Beats
39
42
  extract_tls_peer(hash, ctx)
40
43
 
41
44
  if target_field.nil?
42
- event = LogStash::Event.new(hash)
45
+ event = event_factory.new_event(hash)
43
46
  @nocodec_transformer.transform(event)
44
47
  @queue << event
45
48
  else
@@ -27,7 +27,8 @@ Gem::Specification.new do |s|
27
27
  s.add_runtime_dependency "thread_safe", "~> 0.3.5"
28
28
  s.add_runtime_dependency "logstash-codec-multiline", ">= 2.0.5"
29
29
  s.add_runtime_dependency 'jar-dependencies', '~> 0.3', '>= 0.3.4'
30
- s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.1'
30
+ s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.3'
31
+ s.add_runtime_dependency 'logstash-mixin-event_support', '~>1.0'
31
32
 
32
33
  s.add_development_dependency "flores", "~>0.0.6"
33
34
  s.add_development_dependency "rspec"
@@ -31,6 +31,7 @@ describe LogStash::Inputs::Beats::DecodedEventTransform do
31
31
 
32
32
  include_examples "Common Event Transformation", :disabled, "host"
33
33
  include_examples "Common Event Transformation", :v1, "[@metadata][input][beats][host][name]"
34
+ include_examples "Common Event Transformation", :v8, "[@metadata][input][beats][host][name]"
34
35
 
35
36
  it "tags the event" do
36
37
  expect(subject.get("tags")).to include("beats_input_codec_plain_applied")
@@ -9,4 +9,5 @@ describe LogStash::Inputs::Beats::EventTransformCommon do
9
9
 
10
10
  include_examples "Common Event Transformation", :disabled, "host"
11
11
  include_examples "Common Event Transformation", :v1, "[@metadata][input][beats][host][name]"
12
+ include_examples "Common Event Transformation", :v8, "[@metadata][input][beats][host][name]"
12
13
  end
@@ -211,6 +211,7 @@ describe LogStash::Inputs::Beats::MessageListener do
211
211
 
212
212
  it_behaves_like "when the message is from any libbeat", :disabled, "[@metadata][ip_address]"
213
213
  it_behaves_like "when the message is from any libbeat", :v1, "[@metadata][input][beats][host][ip]"
214
+ it_behaves_like "when the message is from any libbeat", :v8, "[@metadata][input][beats][host][ip]"
214
215
  end
215
216
 
216
217
  context "onException" do
@@ -20,6 +20,7 @@ describe LogStash::Inputs::Beats::RawEventTransform do
20
20
 
21
21
  include_examples "Common Event Transformation", :disabled, "host"
22
22
  include_examples "Common Event Transformation", :v1, "[@metadata][input][beats][host][name]"
23
+ include_examples "Common Event Transformation", :v8, "[@metadata][input][beats][host][name]"
23
24
 
24
25
  it "tags the event" do
25
26
  expect(subject.get("tags")).to include("beats_input_raw_event")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-beats
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.3
4
+ version: 6.2.0
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-21 00:00:00.000000000 Z
11
+ date: 2021-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -111,7 +111,7 @@ dependencies:
111
111
  requirements:
112
112
  - - "~>"
113
113
  - !ruby/object:Gem::Version
114
- version: '1.1'
114
+ version: '1.3'
115
115
  name: logstash-mixin-ecs_compatibility_support
116
116
  prerelease: false
117
117
  type: :runtime
@@ -119,7 +119,21 @@ dependencies:
119
119
  requirements:
120
120
  - - "~>"
121
121
  - !ruby/object:Gem::Version
122
- version: '1.1'
122
+ version: '1.3'
123
+ - !ruby/object:Gem::Dependency
124
+ requirement: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - "~>"
127
+ - !ruby/object:Gem::Version
128
+ version: '1.0'
129
+ name: logstash-mixin-event_support
130
+ prerelease: false
131
+ type: :runtime
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - "~>"
135
+ - !ruby/object:Gem::Version
136
+ version: '1.0'
123
137
  - !ruby/object:Gem::Dependency
124
138
  requirement: !ruby/object:Gem::Requirement
125
139
  requirements:
@@ -283,9 +297,11 @@ files:
283
297
  - vendor/jar-dependencies/com/fasterxml/jackson/core/jackson-databind/2.9.10.8/jackson-databind-2.9.10.8.jar
284
298
  - vendor/jar-dependencies/com/fasterxml/jackson/module/jackson-module-afterburner/2.9.10/jackson-module-afterburner-2.9.10.jar
285
299
  - vendor/jar-dependencies/io/netty/netty-all/4.1.49.Final/netty-all-4.1.49.Final.jar
300
+ - vendor/jar-dependencies/io/netty/netty-all/4.1.65.Final/netty-all-4.1.65.Final.jar
286
301
  - vendor/jar-dependencies/org/apache/logging/log4j/log4j-api/2.11.1/log4j-api-2.11.1.jar
287
302
  - vendor/jar-dependencies/org/javassist/javassist/3.24.0-GA/javassist-3.24.0-GA.jar
288
303
  - vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/6.1.3/logstash-input-beats-6.1.3.jar
304
+ - vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/6.2.0/logstash-input-beats-6.2.0.jar
289
305
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
290
306
  licenses:
291
307
  - Apache License (2.0)
@@ -308,8 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
308
324
  - !ruby/object:Gem::Version
309
325
  version: '0'
310
326
  requirements: []
311
- rubyforge_project:
312
- rubygems_version: 2.6.13
327
+ rubygems_version: 3.1.6
313
328
  signing_key:
314
329
  specification_version: 4
315
330
  summary: Receives events from the Elastic Beats framework