Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable keystore for autodiscover static configuration #16306

Merged
merged 23 commits into from
Apr 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions libbeat/autodiscover/autodiscover.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,15 @@ func (a *Autodiscover) handleStart(event bus.Event) bool {
if a.logger.IsDebug() {

for _, c := range configs {
rc := map[string]interface{}{}
c.Unpack(&rc)

a.logger.Debugf("Generated config: %+v", rc)
a.logger.Debugf("Generated config: %+v", common.DebugString(c, true))
}
}

meta := a.getMeta(event)
for _, config := range configs {
hash, err := cfgfile.HashConfig(config)
if err != nil {
a.logger.Debugf("Could not hash config %v: %v", config, err)
a.logger.Debugf("Could not hash config %v: %v", common.DebugString(config, true), err)
continue
}

Expand All @@ -218,7 +215,7 @@ func (a *Autodiscover) handleStart(event bus.Event) bool {
dynFields := a.meta.Store(hash, meta)

if a.configs[eventID][hash] != nil {
a.logger.Debugf("Config %v is already running", config)
a.logger.Debugf("Config %v is already running", common.DebugString(config, true))
ChrsMark marked this conversation as resolved.
Show resolved Hide resolved
continue
}

Expand Down