From 82dc7c09367851f3c2b25d31498b4808315bd002 Mon Sep 17 00:00:00 2001 From: Andrew Kroh Date: Fri, 5 Jun 2020 03:57:07 -0400 Subject: [PATCH] Fix issue with missing module fields in index template (#18983) The fields.go files were not being imported for the Winlogbeat modules so they were absent from the index template. --- CHANGELOG.next.asciidoc | 3 ++- x-pack/winlogbeat/cmd/root.go | 3 +++ x-pack/winlogbeat/main.go | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 5a32a6dc00ea..97b70954a5bb 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -232,7 +232,8 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d *Winlogbeat* -- Fix invalid IP addresses in DNS query results from Sysmon data. {issue}18432[18432] {pull}18436{18436} +- Fix invalid IP addresses in DNS query results from Sysmon data. {issue}18432[18432] {pull}18436[18436] +- Fields from Winlogbeat modules were not being included in index templates and patterns. {pull}18983[18983] *Functionbeat* diff --git a/x-pack/winlogbeat/cmd/root.go b/x-pack/winlogbeat/cmd/root.go index 94fd93d5b6f1..684e1660299c 100644 --- a/x-pack/winlogbeat/cmd/root.go +++ b/x-pack/winlogbeat/cmd/root.go @@ -7,6 +7,9 @@ package cmd import ( "github.com/elastic/beats/v7/winlogbeat/cmd" xpackcmd "github.com/elastic/beats/v7/x-pack/libbeat/cmd" + + // Register fields. + _ "github.com/elastic/beats/v7/x-pack/winlogbeat/include" ) // Name of this beat. diff --git a/x-pack/winlogbeat/main.go b/x-pack/winlogbeat/main.go index 2f5400d02ea3..21fd70be7f68 100644 --- a/x-pack/winlogbeat/main.go +++ b/x-pack/winlogbeat/main.go @@ -7,8 +7,6 @@ package main import ( "os" - _ "github.com/elastic/beats/v7/winlogbeat/include" - "github.com/elastic/beats/v7/x-pack/winlogbeat/cmd" )