Skip to content

Commit

Permalink
Osquerybeat: Align with the rest of the beats, set the ECS version (e…
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksmaus authored and michalpristas committed Jun 17, 2021
1 parent 2d8b720 commit e5e74e3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion x-pack/osquerybeat/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,33 @@ import (

cmd "github.com/elastic/beats/v7/libbeat/cmd"
"github.com/elastic/beats/v7/libbeat/cmd/instance"
"github.com/elastic/beats/v7/libbeat/common"
"github.com/elastic/beats/v7/libbeat/publisher/processing"

_ "github.com/elastic/beats/v7/x-pack/libbeat/include"
)

// 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 e5e74e3

Please sign in to comment.