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 alias to v1 implementation #68

Merged
merged 5 commits into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
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 @@
## 3.6.0
- Add support for ECS v8 as alias to v1 implementation [#68](https:/logstash-plugins/logstash-input-syslog/pull/68)

## 3.5.0
- Feat: ECS compatibility support [#63](https:/logstash-plugins/logstash-input-syslog/pull/63)

Expand Down
2 changes: 1 addition & 1 deletion docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ input plugins.
* Value type is <<string,string>>
* Supported values are:
** `disabled`: does not use ECS-compatible field names (for example, `priority` for syslog priority)
** `v1`: uses fields that are compatible with Elastic Common Schema (for example, `[log][syslog][priority]`)
** `v1`,`v8`: uses fields that are compatible with Elastic Common Schema (for example, `[log][syslog][priority]`)
* 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/inputs/syslog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Note: This input will start listeners on both TCP and UDP.
#
class LogStash::Inputs::Syslog < LogStash::Inputs::Base
include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled, :v1)
include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled, :v1, :v8 => :v1)

config_name "syslog"

Expand Down
4 changes: 2 additions & 2 deletions logstash-input-syslog.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ Gem::Specification.new do |s|

# Gem dependencies
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~> 1.1'
s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~> 1.2'

s.add_runtime_dependency 'concurrent-ruby'
s.add_runtime_dependency 'stud', '>= 0.0.22', '< 0.1.0'

s.add_runtime_dependency 'logstash-codec-plain'
s.add_runtime_dependency 'logstash-filter-grok', '>= 4.4.0'
s.add_runtime_dependency 'logstash-filter-grok', '>= 4.4.1'
s.add_runtime_dependency 'logstash-filter-date'

s.add_development_dependency 'logstash-devutils'
Expand Down
2 changes: 1 addition & 1 deletion spec/inputs/syslog_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def pattern_path(path)
end

context 'tag', :ecs_compatibility_support do
ecs_compatibility_matrix(:disabled, :v1) do
ecs_compatibility_matrix(:disabled, :v1, :v8 => :v1) do

before(:each) do
allow_any_instance_of(described_class).to receive(:ecs_compatibility).and_return(ecs_compatibility)
Expand Down