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

Remove Beats central management #25696

Merged
merged 11 commits into from
May 31, 2021
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Set `cleanup_timeout` to zero by default in docker and kubernetes autodiscover in all beats except Filebeat where it is kept to 60 seconds. {pull}24681[24681]
- Update to ECS 1.9.0. {pull}24909[24909]
- Remove id_field_data {pull}25239[25239]
- Removed beats central management {pull}25696[25696], {issue}23908[23908]

*Auditbeat*

Expand Down
3 changes: 1 addition & 2 deletions x-pack/auditbeat/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ package cmd
import (
auditbeatcmd "github.com/elastic/beats/v7/auditbeat/cmd"
"github.com/elastic/beats/v7/libbeat/cmd"
xpackcmd "github.com/elastic/beats/v7/x-pack/libbeat/cmd"

// Register Auditbeat x-pack modules.
_ "github.com/elastic/beats/v7/x-pack/auditbeat/include"
_ "github.com/elastic/beats/v7/x-pack/libbeat/include"
)

// Name of the beat
Expand All @@ -23,5 +23,4 @@ func init() {
settings := auditbeatcmd.AuditbeatSettings()
settings.ElasticLicensed = true
RootCmd = auditbeatcmd.Initialize(settings)
xpackcmd.AddXPack(RootCmd, auditbeatcmd.Name)
}
3 changes: 1 addition & 2 deletions x-pack/filebeat/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ package cmd
import (
fbcmd "github.com/elastic/beats/v7/filebeat/cmd"
cmd "github.com/elastic/beats/v7/libbeat/cmd"
xpackcmd "github.com/elastic/beats/v7/x-pack/libbeat/cmd"

// Register the includes.
_ "github.com/elastic/beats/v7/x-pack/filebeat/include"
inputs "github.com/elastic/beats/v7/x-pack/filebeat/input/default-inputs"
_ "github.com/elastic/beats/v7/x-pack/libbeat/include"
)

const Name = fbcmd.Name
Expand All @@ -21,6 +21,5 @@ func Filebeat() *cmd.BeatsRootCmd {
settings := fbcmd.FilebeatSettings()
settings.ElasticLicensed = true
command := fbcmd.Filebeat(inputs.Init, settings)
xpackcmd.AddXPack(command, Name)
return command
}
4 changes: 2 additions & 2 deletions x-pack/heartbeat/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ package cmd
import (
heartbeatCmd "github.com/elastic/beats/v7/heartbeat/cmd"
"github.com/elastic/beats/v7/libbeat/cmd"
xpackcmd "github.com/elastic/beats/v7/x-pack/libbeat/cmd"

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

// RootCmd to handle beats cli
Expand All @@ -17,5 +18,4 @@ func init() {
settings := heartbeatCmd.HeartbeatSettings()
settings.ElasticLicensed = true
RootCmd = heartbeatCmd.Initialize(settings)
xpackcmd.AddXPack(RootCmd, heartbeatCmd.Name)
}
4 changes: 2 additions & 2 deletions x-pack/journalbeat/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ package cmd
import (
journalbeatCmd "github.com/elastic/beats/v7/journalbeat/cmd"
"github.com/elastic/beats/v7/libbeat/cmd"
xpackcmd "github.com/elastic/beats/v7/x-pack/libbeat/cmd"

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

// RootCmd to handle beats cli
Expand All @@ -17,5 +18,4 @@ func init() {
settings := journalbeatCmd.JournalbeatSettings()
settings.ElasticLicensed = true
RootCmd = journalbeatCmd.Initialize(settings)
xpackcmd.AddXPack(RootCmd, journalbeatCmd.Name)
}
131 changes: 0 additions & 131 deletions x-pack/libbeat/cmd/enroll.go

This file was deleted.

13 changes: 2 additions & 11 deletions x-pack/libbeat/cmd/inject.go → x-pack/libbeat/include/include.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

package cmd
package include

import (
"github.com/elastic/beats/v7/libbeat/cmd"

// register central management
// Register Fleet
_ "github.com/elastic/beats/v7/x-pack/libbeat/management"

// Register fleet
_ "github.com/elastic/beats/v7/x-pack/libbeat/management/fleet"
// register processors
_ "github.com/elastic/beats/v7/x-pack/libbeat/processors/add_cloudfoundry_metadata"
_ "github.com/elastic/beats/v7/x-pack/libbeat/processors/add_nomad_metadata"
Expand All @@ -21,8 +17,3 @@ import (
_ "github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/elb"
_ "github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/nomad"
)

// AddXPack extends the given root folder with XPack features
func AddXPack(root *cmd.BeatsRootCmd, name string) {
root.AddCommand(genEnrollCmd(name, ""))
}
3 changes: 1 addition & 2 deletions x-pack/libbeat/libbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ import (

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

// RootCmd to test libbeat
var RootCmd = cmd.GenRootCmdWithSettings(mock.New, mock.Settings)

func main() {
xpackcmd.AddXPack(RootCmd, mock.Name)
if err := RootCmd.Execute(); err != nil {
os.Exit(1)
}
Expand Down
110 changes: 0 additions & 110 deletions x-pack/libbeat/management/api/auth_client.go

This file was deleted.

Loading