add cluster_uuid to node metrics

This commit is contained in:
medcl 2023-10-25 11:57:53 +08:00
parent 4415e63aa4
commit 505a76072b
2 changed files with 3 additions and 1 deletions

View File

@ -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:

View File

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