diff --git a/topology/server/agentmanager/init.go b/topology/server/agentmanager/init.go index 9749d0008c0296c66b40ba0cc42e7b4c77d2dca0..5f71ecf35f4ed2ba665c115d2dc56ce54d9620a2 100644 --- a/topology/server/agentmanager/init.go +++ b/topology/server/agentmanager/init.go @@ -4,13 +4,13 @@ import ( "gitee.com/openeuler/PilotGo-plugins/sdk/plugin/client" ) -const Version = "0.0.1" +const Version = "1.0.1" var PluginInfo = &client.PluginInfo{ - Name: "topo", + Name: "topology", Version: Version, Description: "system application architecture perception", Author: "wangjunqi", Email: "wangjunqi@kylinos.cn", - Url: "http://192.168.75.100:9995/plugin/topo", + Url: "http://10.1.10.131:9991/plugin/topology", } diff --git a/topology/server/agentmanager/topoclient.go b/topology/server/agentmanager/topoclient.go index dbcf4bd1fe22dec8ea22c34ba074b93bd99fd7d0..deef5730baf3d4927296fcfe535e19f2c05dd05b 100644 --- a/topology/server/agentmanager/topoclient.go +++ b/topology/server/agentmanager/topoclient.go @@ -70,6 +70,7 @@ func (t *Topoclient) InitLogger() { } func (t *Topoclient) InitPluginClient() { + PluginInfo.Url = "http://" + conf.Config().Topo.Server_addr + "/plugin/topology" PluginClient := client.DefaultClient(PluginInfo) PluginClient.Server = "http://" + conf.Config().PilotGo.Addr Topo = &Topoclient{ diff --git a/topology/server/processor/processor.go b/topology/server/processor/processor.go index a11f43da6f12e2b854c6116943e2eb60d12b5073..3b59b4de3b32a0c7a33c11569172a5b60b7a8d3e 100644 --- a/topology/server/processor/processor.go +++ b/topology/server/processor/processor.go @@ -3,6 +3,7 @@ package processor import ( "fmt" "strconv" + "strings" "sync" "gitee.com/openeuler/PilotGo-plugin-topology-server/agentmanager" @@ -155,7 +156,7 @@ func (d *DataProcesser) Create_node_entities(agent *agentmanager.Agent_m, nodes // 临时定义不含网络流量metric的网络节点 for _, net := range agent.Netconnections_2 { net_node := &meta.Node{ - ID: fmt.Sprintf("%s_%s_%d", agent.UUID, meta.NODE_NET, net.Pid), + ID: fmt.Sprintf("%s_%s_%d:%s", agent.UUID, meta.NODE_NET, net.Pid, strings.Split(net.Laddr, ":")[1]), Name: net.Laddr, Type: meta.NODE_NET, UUID: agent.UUID,