Skip to content

Commit

Permalink
If confdir is relative, make it relative to the config path (#1435)
Browse files Browse the repository at this point in the history
This should hopefully  be the least surprise for the user. Part of #1417.
  • Loading branch information
tsg authored and andrewkroh committed Apr 20, 2016
1 parent 349cf64 commit 5399141
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 5399141

Please sign in to comment.