Skip to content

Commit

Permalink
Fix deprecation warning for xpack.monitoring (#11913)
Browse files Browse the repository at this point in the history
Will be removed in 8.0 instead of 7.0.
  • Loading branch information
simitt authored Apr 24, 2019
1 parent b76fc1c commit 50f1180
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libbeat/monitoring/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const (

var (
errMonitoringBothConfigEnabled = errors.New("both xpack.monitoring.* and monitoring.* cannot be set. Prefer to set monitoring.* and set monitoring.elasticsearch.hosts to monitoring cluster hosts")
warnMonitoringDeprecatedConfig = "xpack.monitoring.* settings are deprecated. Use monitoring.* instead, but set monitoring.elasticsearch.hosts to monitoring cluster hosts"
warnMonitoringDeprecatedConfig = "xpack.monitoring.* settings are deprecated. Use monitoring.* instead, but set monitoring.elasticsearch.hosts to monitoring cluster hosts."
)

// Default is the global default metrics registry provided by the monitoring package.
Expand Down Expand Up @@ -92,7 +92,7 @@ func SelectConfig(beatCfg BeatConfig) (*common.Config, *report.Settings, error)
case beatCfg.Monitoring.Enabled() && beatCfg.XPackMonitoring.Enabled():
return nil, nil, errMonitoringBothConfigEnabled
case beatCfg.XPackMonitoring.Enabled():
cfgwarn.Deprecate("7.0", warnMonitoringDeprecatedConfig)
cfgwarn.Deprecate("8.0", warnMonitoringDeprecatedConfig)
monitoringCfg := beatCfg.XPackMonitoring
return monitoringCfg, &report.Settings{Format: report.FormatXPackMonitoringBulk}, nil
case beatCfg.Monitoring.Enabled():
Expand Down

0 comments on commit 50f1180

Please sign in to comment.