Skip to content

Commit

Permalink
Osquerybeat: Align with the rest of the beats, set the ECS version (#…
Browse files Browse the repository at this point in the history
…26324)

(cherry picked from commit 8c810f9)

# Conflicts:
#	x-pack/osquerybeat/cmd/root.go
  • Loading branch information
aleksmaus authored and mergify-bot committed Jun 15, 2021
1 parent f28af6f commit 9ec1863
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion x-pack/osquerybeat/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9ec1863

Please sign in to comment.