Skip to content

Commit

Permalink
Fix field not being added
Browse files Browse the repository at this point in the history
  • Loading branch information
urso committed Aug 20, 2020
1 parent 4c5d741 commit 748739b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions heartbeat/monitors/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/elastic/beats/v7/libbeat/cfgfile"
"github.com/elastic/beats/v7/libbeat/common"
"github.com/elastic/beats/v7/libbeat/common/fmtstr"
"github.com/elastic/beats/v7/libbeat/logp"
"github.com/elastic/beats/v7/libbeat/processors"
"github.com/elastic/beats/v7/libbeat/processors/add_formatted_index"
"github.com/elastic/beats/v7/libbeat/publisher/pipetool"
Expand Down Expand Up @@ -104,6 +105,8 @@ func newCommonPublishConfigs(info beat.Info, cfg *common.Config) (pipetool.Confi
}

return func(clientCfg beat.ClientConfig) (beat.ClientConfig, error) {
logp.Info("Client connection with: %#v", clientCfg)

fields := clientCfg.Processing.Fields.Clone()
fields.Put("event.dataset", dataset)

Expand All @@ -128,6 +131,7 @@ func newCommonPublishConfigs(info beat.Info, cfg *common.Config) (pipetool.Confi
}

clientCfg.Processing.EventMetadata = settings.EventMetadata
clientCfg.Processing.Fields = fields
clientCfg.Processing.Meta = meta
clientCfg.Processing.Processor = procs
clientCfg.Processing.KeepNull = settings.KeepNull
Expand Down

0 comments on commit 748739b

Please sign in to comment.