Skip to content

Commit

Permalink
Log CM deprecated (#14018)
Browse files Browse the repository at this point in the history
* log CM deprecated

* updated message

* cfgwarn

* changelog

* changelog
  • Loading branch information
michalpristas authored Oct 14, 2019
1 parent a428d4d commit 279cc7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Use less restrictive API to check if template exists. {pull}13847[13847]
- Do not check for alias when setup.ilm.check_exists is false. {pull}13848[13848]
- Add support for numeric time zone offsets in timestamp processor. {pull}13902[13902]
- Marking Central Management deprecated. {pull}14018[14018]

*Auditbeat*

Expand Down
3 changes: 3 additions & 0 deletions x-pack/libbeat/management/enroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/elastic/beats/libbeat/cfgfile"
"github.com/elastic/beats/libbeat/cmd/instance"
"github.com/elastic/beats/libbeat/common/cfgwarn"
"github.com/elastic/beats/libbeat/common/file"
"github.com/elastic/beats/libbeat/kibana"
"github.com/elastic/beats/x-pack/libbeat/management/api"
Expand All @@ -35,6 +36,8 @@ func Enroll(
return err
}

cfgwarn.Deprecate("8.0.0", "Central Management is no longer under development and has been deprecated. We are working hard to deliver a new and more comprehensive solution and look forward to sharing it with you")

accessToken, err := client.Enroll(beat.Info.Beat, beat.Info.Name, beat.Info.Version, beat.Info.Hostname, beat.Info.ID, enrollmentToken)
if err != nil {
return err
Expand Down
2 changes: 2 additions & 0 deletions x-pack/libbeat/management/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func NewConfigManagerWithConfig(c *Config, registry *reload.Registry, beatUUID u
var blacklist *ConfigBlacklist

if c.Enabled {
cfgwarn.Deprecate("8.0.0", "Central Management is no longer under development and has been deprecated. We are working hard to deliver a new and more comprehensive solution and look forward to sharing it with you")

var err error

if err = validateConfig(c); err != nil {
Expand Down

0 comments on commit 279cc7e

Please sign in to comment.