diff --git a/filebeat/crawler/crawler.go b/filebeat/crawler/crawler.go index ea7e2e174eff..d298ae13951a 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" ) @@ -53,8 +52,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) prospectorsFactory := prospector.NewFactory(c.out, r, c.beatDone) if err := c.prospectorsReloader.Check(prospectorsFactory); err != nil { @@ -67,8 +64,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 916b5e70f41f..5560b2ca5276 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,