Skip to content

Commit

Permalink
Small cleanup of unused code in monitoring initialization (#39496)
Browse files Browse the repository at this point in the history
  • Loading branch information
faec authored May 22, 2024
1 parent 4a67039 commit 18a7e54
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions libbeat/monitoring/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func New(
cfg *conf.C,
outputs conf.Namespace,
) (Reporter, error) {
name, cfg, err := getReporterConfig(cfg, settings, outputs)
name, cfg, err := getReporterConfig(cfg, outputs)
if err != nil {
return nil, err
}
Expand All @@ -79,7 +79,6 @@ func New(

func getReporterConfig(
monitoringConfig *conf.C,
settings Settings,
outputs conf.Namespace,
) (string, *conf.C, error) {
cfg := collectSubObject(monitoringConfig)
Expand All @@ -96,10 +95,6 @@ func getReporterConfig(

// merge reporter config with output config if both are present
if outCfg := outputs.Config(); outputs.Name() == name && outCfg != nil {
// require monitoring to not configure any hosts if output is configured:
hosts := hostsCfg{}
rc.Unpack(&hosts)

merged, err := conf.MergeConfigs(outCfg, rc)
if err != nil {
return "", nil, err
Expand Down

0 comments on commit 18a7e54

Please sign in to comment.