diff --git a/config/init_agent_config.tpl b/config/init_agent_config.tpl index a2c57e51..47ff68d6 100644 --- a/config/init_agent_config.tpl +++ b/config/init_agent_config.tpl @@ -20,6 +20,7 @@ POST .infini_configs/_doc/task_config_tpl elasticsearch: - id: $[[TASK_ID]] name: $[[TASK_ID]] + cluster_uuid: $[[CLUSTER_UUID]] enabled: true endpoints: $[[CLUSTER_ENDPOINT]] discovery: diff --git a/modules/agent/api/remote_config.go b/modules/agent/api/remote_config.go index 674552c6..68c1919c 100644 --- a/modules/agent/api/remote_config.go +++ b/modules/agent/api/remote_config.go @@ -205,6 +205,7 @@ func getAgentIngestConfigs(instance string, items map[string]BindingItem) (strin "variable:\n "+ "TASK_ID: %v\n "+ "CLUSTER_ID: %v\n "+ + "CLUSTER_UUID: %v\n "+ "NODE_UUID: %v\n "+ "CLUSTER_ENDPOINT: [\"%v\"]\n "+ "CLUSTER_USERNAME: \"%v\"\n "+ @@ -212,7 +213,7 @@ func getAgentIngestConfigs(instance string, items map[string]BindingItem) (strin "CLUSTER_LEVEL_TASKS_ENABLED: %v\n "+ "NODE_LEVEL_TASKS_ENABLED: %v\n "+ "NODE_LOGS_PATH: \"%v\"\n\n\n", taskID, taskID, - v.ClusterID,v.NodeUUID, nodeEndPoint, username, password, clusterLevelEnabled, nodeLevelEnabled, v.PathLogs))) + v.ClusterID,v.ClusterUUID,v.NodeUUID, nodeEndPoint, username, password, clusterLevelEnabled, nodeLevelEnabled, v.PathLogs))) } hash := util.MD5digest(buffer.String())