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) (#26332)

(cherry picked from commit 8c810f9)

Co-authored-by: Aleksandr Maus <aleksandr.maus@elastic.co>
  • Loading branch information
mergify[bot] and aleksmaus committed Jun 15, 2021
1 parent 563b84f commit e244d44
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 e244d44

Please sign in to comment.