diff --git a/metricbeat/module/kubernetes/util/kubernetes.go b/metricbeat/module/kubernetes/util/kubernetes.go index 229f8fc39d2..e40f7523091 100644 --- a/metricbeat/module/kubernetes/util/kubernetes.go +++ b/metricbeat/module/kubernetes/util/kubernetes.go @@ -590,6 +590,7 @@ func NewResourceMetadataEnricher( return []string{id} } + // indexFunc retrieves the resource id from a given event indexFunc := func(e mapstr.M) string { name := getString(e, "name") namespace := getString(e, mb.ModuleDataKey+".namespace")