From 993be9cc059a15af1794d104d4ff35ff7f0defd3 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Tue, 11 Dec 2018 09:03:55 +0100 Subject: [PATCH] Add ECS fields to libbeat/fields.yml (#9459) This adds the fields from ECS also to the libbeat/fields.yml. This is needed to have template tests with ECS fields inside. This is only relevant for testing and makes no difference to the Beats. --- libbeat/generator/fields/fields.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libbeat/generator/fields/fields.go b/libbeat/generator/fields/fields.go index c28889b1c9b..0acd8119b2e 100644 --- a/libbeat/generator/fields/fields.go +++ b/libbeat/generator/fields/fields.go @@ -32,12 +32,11 @@ type YmlFile struct { } func collectCommonFiles(esBeatsPath, beatPath string, fieldFiles []*YmlFile) ([]*YmlFile, error) { - var commonFields []string var libbeatFieldFiles []*YmlFile var err error + commonFields := []string{filepath.Join(esBeatsPath, "libbeat/_meta/fields.ecs.yml")} if !isLibbeat(beatPath) { commonFields = append(commonFields, - filepath.Join(esBeatsPath, "libbeat/_meta/fields.ecs.yml"), filepath.Join(esBeatsPath, "libbeat/_meta/fields.common.yml"), )