Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECS: add v8 support as alias for v1 #27

Merged
merged 2 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 4.2.0
- Added support for ECS v8 as alias for ECS v1
yaauie marked this conversation as resolved.
Show resolved Hide resolved

## 4.1.1
- [Doc] Add ECS mapping table [#25](https://github.com/logstash-plugins/logstash-filter-clone/pull/25)
- [DOC] Added note that a new type field is added to the clone [#23](https://github.com/logstash-plugins/logstash-filter-clone/pull/23)
Expand Down
4 changes: 2 additions & 2 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ When ECS is enabled, the tag is stored in the `tags` array field.
Here’s how ECS compatibility mode affects output.
[cols="<l,<l,e,<e"]
|=======================================================================
| ECS disabled | ECS v1 | Availability | Description
| ECS disabled | ECS `v1`, `v8` | Availability | Description

| type | tags | Always | a tag of cloned event
|=======================================================================
Expand Down Expand Up @@ -74,7 +74,7 @@ Note: setting an empty array will not create any clones. A warning message is lo
* Value type is <<string,string>>
* Supported values are:
** `disabled`: does not use ECS-compatible field names
** `v1`: uses fields that are compatible with Elastic Common Schema
** `v1`, `v8`: uses fields that are compatible with Elastic Common Schema
* Default value depends on which version of Logstash is running:
** When Logstash provides a `pipeline.ecs_compatibility` setting, its value is used as the default
** Otherwise, the default value is `disabled`.
Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/filters/clone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# to one of the values provided in its `clones` directive.
# ECS enabled: add a `tags` of each resulting event to one of the values provided in its `clones` directive.
class LogStash::Filters::Clone < LogStash::Filters::Base
include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled, :v1)
include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled, :v1, :v8 => :v1)

config_name "clone"

Expand Down
2 changes: 1 addition & 1 deletion spec/filters/clone_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
describe LogStash::Filters::Clone do

describe "#filter", :ecs_compatibility_support, :aggregate_failures do
ecs_compatibility_matrix(:disabled, :v1) do |ecs_select|
ecs_compatibility_matrix(:disabled, :v1, :v8 => :v1) do |ecs_select|

subject { described_class.new(settings) }
let(:event) { LogStash::Event.new(input) }
Expand Down