-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move module settings to `modules.d` folder We only want to use modules.d layout for `metricbeat.yml`, while keeping `metricbeat.reference.yml` as a single file with all config options * Unify config reloader usage * Add modules management command * Enable `modules` command for metricbeat * Fix windows tests * Add filebeat modules.d support * Do not fail if system.yml is not present * Comment out `reload.period` settings to make clear it's disabled * Add system tests * Update packaging to include `modules.d` folders * Use `$FPM_ARGS` instead of `$COMMAND` * Uncomment filebeat modules As we moved them into modules.d, they won't be enabled until the file is renamed * Do not fail if ES connection fails on pipeline loading * Address review comments
- Loading branch information
1 parent
0d04276
commit d53fb2b
Showing
123 changed files
with
1,293 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package cmd | ||
|
||
import ( | ||
"strings" | ||
|
||
"github.com/pkg/errors" | ||
|
||
"github.com/elastic/beats/libbeat/beat" | ||
"github.com/elastic/beats/libbeat/cfgfile" | ||
"github.com/elastic/beats/libbeat/cmd" | ||
) | ||
|
||
func buildModulesManager(beat *beat.Beat) (cmd.ModulesManager, error) { | ||
config, err := beat.BeatConfig() | ||
if err != nil { | ||
return nil, errors.Wrap(err, "initialization error") | ||
} | ||
|
||
glob, err := config.String("config.modules.path", -1) | ||
if err != nil { | ||
return nil, errors.Errorf("modules management requires 'filebeat.config.modules.path' setting") | ||
} | ||
|
||
if !strings.HasSuffix(glob, "*.yml") { | ||
return nil, errors.Errorf("wrong settings for config.modules.path, it is expected to end with *.yml. Got: %s", glob) | ||
} | ||
|
||
modulesManager, err := cfgfile.NewGlobManager(glob, ".yml", ".disabled") | ||
if err != nil { | ||
return nil, errors.Wrap(err, "initialization error") | ||
} | ||
return modulesManager, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.