diff --git a/modules/agent/api/remote_config.go b/modules/agent/api/remote_config.go index 5e3467a0..6ebc8049 100644 --- a/modules/agent/api/remote_config.go +++ b/modules/agent/api/remote_config.go @@ -159,6 +159,10 @@ func getAgentIngestConfigs(instance string, items map[string]BindingItem) (strin } metadata := elastic.GetMetadata(v.ClusterID) + if metadata == nil || metadata.Config == nil{ + log.Errorf("metadata is nil: %v",v.ClusterID) + continue + } var clusterLevelEnabled = false var nodeLevelEnabled = true var clusterEndPoint = metadata.Config.GetAnyEndpoint()