diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cc79e9..7cb439d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 3.1.1 + - Docs: cover existing ECS `v8` alias to `v1` implementation + ## 3.1.0 - Add ECS support. Add `target` option [#20](https://github.com/logstash-plugins/logstash-codec-es_bulk/pull/20) diff --git a/docs/index.asciidoc b/docs/index.asciidoc index 40eebee..4307bfc 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -58,7 +58,7 @@ When ECS is enabled, the metadata is stored in the `[@metadata][codec][es_bulk]` * Value type is <> * Supported values are: ** `disabled`: unstructured metadata added at @metadata -** `v1`: uses `[@metadata][codec][es_bulk]` fields +** `v1`,`v8`: uses `[@metadata][codec][es_bulk]` fields Controls this plugin's compatibility with the {ecs-ref}[Elastic Common Schema (ECS)]. diff --git a/logstash-codec-es_bulk.gemspec b/logstash-codec-es_bulk.gemspec index ad44671..fec9ba0 100644 --- a/logstash-codec-es_bulk.gemspec +++ b/logstash-codec-es_bulk.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'logstash-codec-es_bulk' - s.version = '3.1.0' + s.version = '3.1.1' s.licenses = ['Apache License (2.0)'] s.summary = "Reads the Elasticsearch bulk format into separate events, along with metadata" 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" diff --git a/spec/codecs/es_bulk_spec.rb b/spec/codecs/es_bulk_spec.rb index 155e7bc..023b8bb 100644 --- a/spec/codecs/es_bulk_spec.rb +++ b/spec/codecs/es_bulk_spec.rb @@ -5,7 +5,7 @@ require 'logstash/plugin_mixins/ecs_compatibility_support/spec_helper' describe LogStash::Codecs::ESBulk, :ecs_compatibility_support do - ecs_compatibility_matrix(:disabled, :v1, :v8) do |ecs_select| + ecs_compatibility_matrix(:disabled, :v1, :v8 => :v1) do |ecs_select| before(:each) do allow_any_instance_of(described_class).to receive(:ecs_compatibility).and_return(ecs_compatibility) end @@ -26,7 +26,7 @@ { "doc" : {"field2" : "value2"} } HERE - metadata_field = '[@metadata][codec][es_bulk]' + metadata_field = ecs_select[disabled: '[@metadata]', v1:'[@metadata][codec][es_bulk]'] count = 0 subject.decode(data) do |event| @@ -51,7 +51,7 @@ end insist { count } == 4 end - end if ecs_select.active_mode != :disabled + end context "fail to process non-bulk event then continue" do it "continues after a fail" do