From 147cbdf17b762f724c33775e3a77cb51131848ba Mon Sep 17 00:00:00 2001 From: Andrew Kroh Date: Thu, 4 Jun 2020 15:04:25 -0400 Subject: [PATCH] Fix issue with missing module fields in index template 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 8057d79e571..a87f0c13af6 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -230,7 +230,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 94fd93d5b6f..684e1660299 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 2f5400d02ea..21fd70be7f6 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" )