Skip to content

Commit

Permalink
If confdir is relative, make it relative to the config path
Browse files Browse the repository at this point in the history
This should hopefully  be the least surprise for the user. Part of elastic#1417.
  • Loading branch information
Tudor Golubenco committed Apr 20, 2016
1 parent 57477cf commit a3516d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions filebeat/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit a3516d1

Please sign in to comment.