diff --git a/x-pack/osquerybeat/cmd/root.go b/x-pack/osquerybeat/cmd/root.go index adaa112619f..441811a48a8 100644 --- a/x-pack/osquerybeat/cmd/root.go +++ b/x-pack/osquerybeat/cmd/root.go @@ -9,17 +9,37 @@ import ( cmd "github.com/elastic/beats/v7/libbeat/cmd" "github.com/elastic/beats/v7/libbeat/cmd/instance" +<<<<<<< HEAD xpackcmd "github.com/elastic/beats/v7/x-pack/libbeat/cmd" +======= + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/publisher/processing" + + _ "github.com/elastic/beats/v7/x-pack/libbeat/include" +>>>>>>> 8c810f9d8 (Osquerybeat: Align with the rest of the beats, set the ECS version (#26324)) ) // Name of this beat -var Name = "osquerybeat" +const ( + Name = "osquerybeat" + + // ecsVersion specifies the version of ECS that this beat is implementing. + ecsVersion = "1.10.0" +) + +// withECSVersion is a modifier that adds ecs.version to events. +var withECSVersion = processing.WithFields(common.MapStr{ + "ecs": common.MapStr{ + "version": ecsVersion, + }, +}) var RootCmd = Osquerybeat() func Osquerybeat() *cmd.BeatsRootCmd { settings := instance.Settings{ Name: Name, + Processing: processing.MakeDefaultSupport(true, withECSVersion, processing.WithAgentMeta()), ElasticLicensed: true, } command := cmd.GenRootCmdWithSettings(beater.New, settings)