Skip to content

Commit

Permalink
Check clustermeta
Browse files Browse the repository at this point in the history
  • Loading branch information
constanca-m committed Jan 4, 2023
1 parent 2364212 commit 2549538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metricbeat/module/kubernetes/util/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,13 +589,13 @@ func AddClusterECSMeta(base mb.BaseMetricSet) mapstr.M {
client, err := kubernetes.GetKubernetesClient(config.KubeConfig, config.KubeClientOptions)
if err != nil {
logp.Err("fail to get kubernetes client: %s", err)
return nil
return mapstr.M{}
}
cfg, _ := conf.NewConfigFrom(&config)
ecsClusterMeta, err := GetClusterECSMeta(cfg, client, base.Logger())
if err != nil {
logp.Info("could not retrieve cluster metadata: %s", err)
return nil
return mapstr.M{}
}
return ecsClusterMeta
}

0 comments on commit 2549538

Please sign in to comment.