diff --git a/filebeat/config/config.go b/filebeat/config/config.go index ce34ab08debc..f36845637c56 100644 --- a/filebeat/config/config.go +++ b/filebeat/config/config.go @@ -10,6 +10,7 @@ import ( "github.com/elastic/beats/libbeat/cfgfile" "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/libbeat/paths" ) // Defaults for config variables which are not set @@ -161,6 +162,9 @@ func (config *Config) FetchConfigs() { return } + // If configDir is relative, consider it relative to the config path + configDir = paths.Resolve(paths.Config, configDir) + // Check if optional configDir is set to fetch additional config files logp.Info("Additional config files are fetched from: %s", configDir)