Skip to content

Commit

Permalink
Change beat.Info.Name to beat.Info.Beat
Browse files Browse the repository at this point in the history
  • Loading branch information
michel-laterman committed Sep 7, 2021
1 parent 5bd4973 commit 5590c5c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Bump AWS SDK version to v0.24.0 for WebIdentity authentication flow {issue}19393[19393] {pull}27126[27126]
- Add Linux pressure metricset {pull}27355[27355]
- Add support for kube-state-metrics v2.0.0 {pull}27552[27552]
- Add User-Agent header to HTTP requests. {issue}18160[18160]
- Add User-Agent header to HTTP requests. {issue}18160[18160] {pull}27509[27509]

*Packetbeat*

Expand Down
2 changes: 1 addition & 1 deletion libbeat/cmd/export/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func GenDashboardCmd(settings instance.Settings) *cobra.Command {
// part of the initialization.
initConfig := instance.InitKibanaConfig(b.Config)

client, err := kibana.NewKibanaClient(initConfig, b.Info.Name)
client, err := kibana.NewKibanaClient(initConfig, b.Info.Beat)
if err != nil {
fatalf("Error creating Kibana client: %+v.\n", err)
}
Expand Down
4 changes: 2 additions & 2 deletions libbeat/cmd/instance/beat.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ func (b *Beat) Setup(settings Settings, bt beat.Creator, setup SetupSettings) er
if outCfg.Name() != "elasticsearch" {
return fmt.Errorf("Index management requested but the Elasticsearch output is not configured/enabled")
}
esClient, err := eslegclient.NewConnectedClient(outCfg.Config(), b.Info.Name)
esClient, err := eslegclient.NewConnectedClient(outCfg.Config(), b.Info.Beat)
if err != nil {
return err
}
Expand Down Expand Up @@ -808,7 +808,7 @@ func (b *Beat) loadDashboards(ctx context.Context, force bool) error {
// initKibanaConfig will attach the username and password into kibana config as a part of the initialization.
kibanaConfig := InitKibanaConfig(b.Config)

client, err := kibana.NewKibanaClient(kibanaConfig, b.Info.Name)
client, err := kibana.NewKibanaClient(kibanaConfig, b.Info.Beat)
if err != nil {
return fmt.Errorf("error connecting to Kibana: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion libbeat/dashboards/dashboards.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func ImportDashboards(
return errors.New("kibana configuration missing for loading dashboards")
}

return setupAndImportDashboardsViaKibana(ctx, beatInfo.Hostname, beatInfo.Name, kibanaConfig, &dashConfig, msgOutputter, pattern)
return setupAndImportDashboardsViaKibana(ctx, beatInfo.Hostname, beatInfo.Beat, kibanaConfig, &dashConfig, msgOutputter, pattern)
}

func setupAndImportDashboardsViaKibana(ctx context.Context, hostname, beatname string, kibanaConfig *common.Config,
Expand Down
2 changes: 1 addition & 1 deletion libbeat/monitoring/report/elasticsearch/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func makeReporter(beat beat.Info, settings report.Settings, cfg *common.Config)

var clients []outputs.NetworkClient
for _, host := range hosts {
client, err := makeClient(host, params, &config, beat.Name)
client, err := makeClient(host, params, &config, beat.Beat)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion libbeat/outputs/elasticsearch/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func makeES(
client, err = NewClient(ClientSettings{
ConnectionSettings: eslegclient.ConnectionSettings{
URL: esURL,
Beatname: beat.Name,
Beatname: beat.Beat,
Kerberos: config.Kerberos,
Username: config.Username,
Password: config.Password,
Expand Down

0 comments on commit 5590c5c

Please sign in to comment.