From bc84970df6de1e4017cdd1718358f13c60cae92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20P=C3=A9rez-Aradros=20Herce?= Date: Wed, 20 Sep 2017 08:06:35 +0200 Subject: [PATCH] Update `beta` messages for config reload (#5202) --- filebeat/crawler/crawler.go | 5 ----- libbeat/cfgfile/reload.go | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/filebeat/crawler/crawler.go b/filebeat/crawler/crawler.go index 891880a400a..4582ccedf67 100644 --- a/filebeat/crawler/crawler.go +++ b/filebeat/crawler/crawler.go @@ -11,7 +11,6 @@ import ( "github.com/elastic/beats/filebeat/registrar" "github.com/elastic/beats/libbeat/cfgfile" "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/common/cfgwarn" "github.com/elastic/beats/libbeat/logp" _ "github.com/elastic/beats/filebeat/include" @@ -55,8 +54,6 @@ func (c *Crawler) Start(r *registrar.Registrar, configProspectors *common.Config } if configProspectors.Enabled() { - cfgwarn.Beta("Loading separate prospectors is enabled.") - c.prospectorsReloader = cfgfile.NewReloader(configProspectors) runnerFactory := prospector.NewRunnerFactory(c.out, r, c.beatDone) if err := c.prospectorsReloader.Check(runnerFactory); err != nil { @@ -69,8 +66,6 @@ func (c *Crawler) Start(r *registrar.Registrar, configProspectors *common.Config } if configModules.Enabled() { - cfgwarn.Beta("Loading separate modules is enabled.") - c.modulesReloader = cfgfile.NewReloader(configModules) modulesFactory := fileset.NewFactory(c.out, r, c.beatVersion, pipelineLoaderFactory, c.beatDone) if err := c.modulesReloader.Check(modulesFactory); err != nil { diff --git a/libbeat/cfgfile/reload.go b/libbeat/cfgfile/reload.go index 916b5e70f41..5560b2ca527 100644 --- a/libbeat/cfgfile/reload.go +++ b/libbeat/cfgfile/reload.go @@ -10,6 +10,7 @@ import ( "github.com/pkg/errors" "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/libbeat/common/cfgwarn" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/libbeat/monitoring" "github.com/elastic/beats/libbeat/paths" @@ -73,6 +74,10 @@ func NewReloader(cfg *common.Config) *Reloader { path = paths.Resolve(paths.Config, path) } + if config.Reload.Enabled { + cfgwarn.Beta("Dynamic config reload is enabled.") + } + return &Reloader{ registry: NewRegistry(), config: config,