ignore invalid clusters

This commit is contained in:
medcl 2023-10-25 09:02:46 +08:00
parent 7fa78f47ec
commit 833748b9e8
1 changed files with 4 additions and 0 deletions

View File

@ -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()