Merge pull request #1351 from mattdurham/check_settings

This commit is contained in:
Jan-Otto Kröpke 2023-11-27 19:09:36 +01:00 committed by GitHub
commit 5a872a227c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,13 +25,15 @@ const (
) )
type Config struct { type Config struct {
ProcessInclude string `yaml:"process_include"` ProcessInclude string `yaml:"process_include"`
ProcessExclude string `yaml:"process_exclude"` ProcessExclude string `yaml:"process_exclude"`
EnableWorkerProcess bool `yaml:"enable_iis_worker_process"`
} }
var ConfigDefaults = Config{ var ConfigDefaults = Config{
ProcessInclude: ".+", ProcessInclude: ".+",
ProcessExclude: "", ProcessExclude: "",
EnableWorkerProcess: false,
} }
type collector struct { type collector struct {
@ -68,8 +70,9 @@ func New(logger log.Logger, config *Config) types.Collector {
} }
c := &collector{ c := &collector{
processExclude: &config.ProcessExclude, processExclude: &config.ProcessExclude,
processInclude: &config.ProcessInclude, processInclude: &config.ProcessInclude,
enableWorkerProcess: &config.EnableWorkerProcess,
} }
c.SetLogger(logger) c.SetLogger(logger)
return c return c