Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.13](backport #26324) Osquerybeat: Align with the rest of the beats, set the ECS version #26333

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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